Node.js stabilizes built‑in TypeScript execution (type‑stripping now default)

Node.jsTypeScriptDevOps

Key update

Node.js has stabilized its built‑in TypeScript support: the runtime's lightweight "type‑stripping" transformer is enabled by default and no longer emits an experimental warning in recent 24.x documentation. This lets Node directly execute .ts files (and watch them) without an external transpiler, provided the code uses only erasable TypeScript syntax; constructs that require JavaScript code generation (for example enums or certain parameter‑property transforms) still require the explicit transform flag. Node intentionally ignores tsconfig.json for runtime behavior, requires explicit file extensions in imports, and by default will not run TypeScript files nested under node_modules.

Why it matters

This is a practical change, not just a convenience: for scripts, CLI tools, simple backends, and developer workflows you can now remove the transpile step entirely and run TypeScript source directly with Node (faster iteration, fewer dev‑dependencies, simpler CI for quick tasks). However, it is not a drop‑in replacement for a full TypeScript build pipeline. The runtime performs no type checking and omits tsconfig rules such as path alias rewriting, so production builds that need type safety, older target transpilation, packaging compatibility, or predictable module resolution should still include a proper compile step (tsc, swc, or esbuild) and a test/CI type check. For library authors and teams, expect small but important toolchain changes: enforce explicit import extensions, review usage of TS features that require code generation, and consider incremental adoption (use runtime execution for dev/scripting while keeping a build step for releases). Overall, this reduces friction for many day‑to‑day developer tasks but does not eliminate the need for deliberate build and testing practices in production.

Source

Read Next