Node.js introduces the
--experimental-strip-types flag for initial TypeScript support. This feature strips type annotations from .ts files, allowing them to run without transforming TypeScript-specific syntax. Current limitations include:- Supports only inline type annotations, not features like enums or namespaces.
- Requires explicit file extensions in import and require statements.
- Enforces the use of the type keyword for type imports to avoid runtime errors.
- Disabled for TypeScript in node_modules by default.
Rafael Gonzaga
