let\'s say I have a block of code that I\'d like to only be present (or run) in a staging environment. I\'ve set an environment variable in that enivronment (say, ENV = \'st
is there a way for TypeScript to access that variable during compilation
Yup. Prefer using process.env that works as is in node and can be used with webpack using --define.
Example showing how to use it for build output toggles : https://basarat.gitbooks.io/typescript/content/docs/tips/build-toggles.html