TypeScript on Node

Front-End Web Development covers the TypeScript language and what tsc does with a program. This section covers the other half: getting that code to run on a Node process, in a terminal and in a container, without a build step you have to babysit.

Node 22.6.0 added type stripping behind a flag, Node 23.6.0 and 22.18.0 turned it on by default, and in Node 25.2.0 and 24.12.0 it became Stable. On any supported release node app.ts just works. What it does not do is check types, read tsconfig.json, or transform anything — so a Node TypeScript project is two independent decisions: how the code runs, and how it is checked.

The three ways to run TypeScript on Node, and what each one gives you
Approach Type checking tsconfig honored Extra dependency
node app.ts (stripping) No No None
tsx 12,162  app.ts No Yes tsx
tsc then node dist/app.js Yes Yes typescript

Everything below runs on Node v25.8.0 with typescript@7.0.2, @types/node@25.9.7 and tsx@4.23.13.

Subsections