Node.js · Senior · Question 55 of 75
How does Node.js handle enum and namespace when running TypeScript with type stripping?
- ✓Correct answer: They are not erasable syntax, so they fail unless you enable transformation (or avoid them)
- 2They work exactly like in
tsc - 3They are removed silently
Explanation
Type stripping only removes types. TypeScript's erasableSyntaxOnly option lets the compiler flag such syntax in advance.