Node.js 24 Drops the Build Step for TypeScript

Node.js 24 ships native TypeScript support via runtime type stripping. You can now execute .ts files in production without transpilation, bundling, or watch mode. The runtime parses TypeScript, strips type annotations at load time, and passes the resulting JavaScript to V8. No tsc, no dist/ directory, no source map coordination between builds.

This eliminates the dual-artifact problem: teams no longer juggle TypeScript source and JavaScript output. The source of truth is singular. Development and production environments match exactly.

How Type Stripping Works

The mechanism operates in three phases:

  1. Module loader identifies .ts files via extension or package.json type field.
  2. Parser generates an AST and marks type-only nodes (annotations, interfaces, type imports).
  3. Transform removes marked nodes and passes the resulting JavaScript to V8.

No type checking occurs. No .d.ts files are generated. The runtime treats TypeScript as "annotated JavaScript" and discards the annotations before execution.

Performance impact is limited to cold starts. Type stripping happens once per module load, then results are cached in the module graph. Subsequent imports use the cached JavaScript representation. Container pre-warming with readiness probes or serverless pre-warm hooks mitigates cold start overhead.

Running TypeScript in Production

The deployment model shifts from build artifacts to source deployment. Instead of compiling to dist/, teams deploy .ts files directly. Entry point configuration is straightforward:

node src/server.ts

No flags needed. The runtime strips Request, Response, UserPayload type annotations before execution. The compiled output never exists on disk — only in the module cache.

Source map debugging requires explicit --enable-source-maps flag:

{
  "scripts": {
    "start": "node --enable-source-maps src/server.ts",
    "dev": "node --watch --enable-source-maps src/server.ts"
  }
}

What Native TypeScript Does NOT Do

Native TypeScript has critical limitations:

Teams relying on these features must keep their build pipeline.

Production Considerations

Three technical concerns dominate production readiness:

  1. Startup performance: Cold starts incur parsing and transformation cost for every imported module. Mitigate with container pre-warming.
  2. Debugging: --enable-source-maps maps stack traces back to TypeScript line numbers.
  3. Type safety: Runtime strips types without validation. Run tsc --noEmit in CI to catch errors before deployment.

Silent type errors reaching production is a real risk. The runtime discards types without inspection. Production code still needs explicit validation with libraries like zod or ajv.

Migration Decision Matrix

Not all projects benefit from eliminating the build step. Evaluate based on:

Teams running microservices with simple dependency graphs gain the most. The deployment velocity improvement outweighs optimization loss for small, frequently updated services. Large applications with complex build requirements see less value.

What You Gain and Lose

Native TypeScriptTraditional Pipeline
Single source of truthSeparate build artifacts
No compilation steptsc or bundler required
Dev/prod parityPotential mismatch
No type checking at runtimeType checking during build
No path aliases or decoratorsFull transformation support
Cold start overheadPre-compiled startup

Next Steps for Developers

  1. Check if your project uses path aliases or decorators. If yes, stay on your current build pipeline.
  2. Run node --experimental-strip-types src/server.ts in Node.js 22+ to test the feature early.
  3. Add tsc --noEmit to your CI pipeline if you plan to adopt native execution.
  4. Containerize with pre-warm hooks to mitigate cold start latency.
  5. For new microservices with simple dependencies, start with native TypeScript from day one.