TypeScript · Junior · Question 73 of 75
Can recent Node.js versions run a .ts file directly?
- ✓Correct answer: Yes - Node can strip erasable type annotations and run the file, but it doesn't type-check
- 2No - Node only runs
.js - 3Yes, and it reports type errors like
tsc
Explanation
Type stripping removes types without transformation, so features that generate code (like enum) need extra flags or a compiler.