How to execute TypeScript file using command line?
After installing typescript, create a .ts file, for example, greet.ts as given below:
You can merge both the commands by using a pole | and && like below :
You can also install ts-node
along with typescript using the following command:
- To install:
npm install -g ts-node
- To run:
Using any of the three ways, the output will remain the same.
Greetings from GeeksforGeeks
Share your thoughts in the comments
Please Login to comment...