Using TypeScript version 1.7.5.
I am writing a nodeJS program in which I want to read in command line arguments passed by the user (2 integers). Everything works fine in raw JavaScript, but an issue arises with TypeScript.
When
process.argvis used in the TypeScript file, when it is compiled to JavaScript the compiler errors because it does not recognize the process variable.
error TS2304: Cannot find name 'process'
I have tried declaring a new var process at the top of the file, but that overrides the native variable and it no longer contains the arguments...
I would like to keep all my code all in TypeScript, only compiling to JavaScript at build time. What is the best workaround for this issue?