Question:
I know that TS is converted to JS usingtsc
Then after we get
.js
, we execute the .js
file using node
.These are 2 steps in order to execute a
.ts
fileMy question is, how to do it in 1 step? (like one command instead of 2(
tsc
and node
)Answer:
You can usets-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!