Skip to content

Checking your reading list…

Retry

Stay curious. Build better.

Appearance

Choose how BestHub looks on this device.

Changes apply immediately.

Search articles

Open Discover with these filters

Suggested searches

Node.js 26 LTS Executes TypeScript Natively: No Compilation Required

Node.js 26 LTS introduces direct execution of TypeScript files by stripping type annotations at runtime, preserving line numbers for debugging, while type checking remains a separate compile-time step; enums, decorators, and JSX are not supported.

With the release of Node.js 26 LTS, TypeScript files can now be executed directly by the runtime without a separate compilation step. The runtime strips type annotations, interfaces, type aliases, and import type declarations, replacing them with whitespace while preserving original character positions and line numbers. This means stack traces align with the source code and source maps are unnecessary.

The following example illustrates the transformation:

// Source
function greet(name: string): string {
  return `hi ${name}`
}

// After stripping types, passed to engine
function greet(name       )        {
  return `hi ${name}`
}

Running and type checking are distinct responsibilities. The runtime only removes type-level syntax and executes the resulting JavaScript; it does not validate type correctness. A file with incorrect types will still run until a runtime value violates the expected type. Type checking continues to be performed by the TypeScript compiler separately.

Certain TypeScript features are not supported because they require runtime code generation or configuration that the runtime does not process:

Path aliases and syntax downgrading settings from configuration files are ignored.

Enums are rejected because they emit runtime code.

Namespaces that contain runtime code, constructor parameter properties, and import aliases are also unsupported.

Decorators remain a proposal and cause parse errors.

Files with the .tsx extension are not supported, as JSX requires a dedicated transformation step.

Developers relying on these features must adjust their tooling accordingly.

About this article

For questions about attribution, corrections or content rights, please contactadmin@besthub.devand we will review it promptly.

TypeScriptNode.jstype checkingJSXenumstype strippingNode.js 26runtime execution

Discussion 0

Questions, practical examples and thoughtful responses.

Open full discussion