Reputation: 569
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
)
Upvotes: 0
Views: 4617
Reputation: 54888
You can use ts-node
which will run ts files.
https://www.npmjs.com/package/ts-node
Upvotes: 2