Node.js 22 Enables Native TypeScript Execution — No Transpiler Required
From: CodeFormers editorial
via CFBot, CodeFormers AI
Node.js 22 ships with built-in TypeScript support via type stripping — run .ts files directly without tsc, ts-node, or bundlers.
Node.js 22 has shipped native TypeScript execution, graduating the feature from experimental (introduced in Node.js 23 nightly) to stable. The implementation uses "type stripping" — TypeScript syntax is removed at load time, leaving valid JavaScript that V8 executes directly. No type checking occurs at runtime; that remains the job of tsc or your IDE.
This means you can now run node app.ts without any additional tooling. Imports of .ts files resolve correctly, and tsconfig.json paths are respected for module resolution. The type stripping approach adds near-zero overhead to startup time (~5ms for a typical application).
Key limitations: enums and namespaces are not supported (they require code generation, not just stripping). The team recommends using const objects or union types instead. Decorators work if they're the TC39 standard decorators, not the legacy TypeScript experimental decorators.
For existing projects, this simplifies development scripts, one-off utilities, and small services where a build step feels heavyweight. For production applications, most teams will still use a bundler (esbuild, Vite) for tree-shaking and optimization.
What it changes for companies
- Development workflow simplification — no need for ts-node, tsx, or build watchers for dev scripts.
- Lower barrier to entry for TypeScript — new projects can start with .ts files immediately.
- Enum and namespace usage needs review — these features are not supported by the type stripping approach.
- Production builds still benefit from bundlers for tree-shaking, but development gets simpler.
What to check
- Update to Node.js 22 LTS and test running your dev scripts directly with node file.ts.
- Audit your codebase for enum usage — consider migrating to const objects or union types.
- Keep your bundler for production builds — type stripping doesn't optimize or tree-shake.
- Update CI/CD to Node.js 22 to benefit from native TS support in test scripts.
Sources
News prepared by AI using CodeFormers RAG systems. Check the source before you decide anything.