Node.js · Junior · Question 72 of 75

Can recent Node.js versions run a .ts file directly?

Explanation

Type stripping supports 'erasable' syntax only. Features that need code generation, like enum, need extra flags or a build step. Run tsc --noEmit to check types.

Further reading

Problem with a question

Node.js · Junior · question 72

Test yourself

Take the Node.js · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz