Ross Khanas Ross Khanas - 3 months ago 137
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.


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.