• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: How to compile and execute typescript files using 1 command only?

Resolved: How to compile and execute typescript files using 1 command only?

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I know that TS is converted to JS using tsc
Then after we get .js, we execute the .js file using node.
These are 2 steps in order to execute a .ts file
My question is, how to do it in 1 step? (like one command instead of 2(tsc and node)

Answer:

You can use ts-node which will run ts files.
https://www.npmjs.com/package/ts-node

If you have better answer, please add a comment about this, thank you!

node.js npm typescript
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: std::regex_replace to replace multiple combinations

26/03/2023

Resolved: How can I copy files using the ansible.builtin.copy module and avoid conflicting file names?

26/03/2023

Resolved: Reshape tensors of unknown shape with tf.function

26/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.