So I'm new to typescript. I wanted to create very simple HelloWorld where I can pass parameter (here mentioned string) to script, but I'm unable to get it to work. Here's what I'm trying to do:
let sentence: string = process.argv[1];
console.log(sentence);
But when I try to compile it (tsc file.ts) to produce file.js file to execute it with node file.js "HelloWorld" I get following error for process
error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i @types/node`.
Even after I run command mentioned in Error msg. What's going on?