Ross Khanas Ross Khanas - 1 year ago 483
TypeScript Question

TypeScript definitions for process.env.NODE_ENV?

Is there a project with TypeScript definitions for "process" variable to use process.env.NODE_ENV? Couldn't find anywhere.

Answer Source

The definitions for the 'process' variable can be found in default node.js d.ts from definately typed and added in your typings.json like this:

"node": "github:DefinitelyTyped/DefinitelyTyped/node/node.d.ts"

I do not think there are any definitions for the particular NODE_ENV variable. As it is just a convention (widely used by express link) and node.js itself does not care about that specific environment variable.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download