The Path to Native TypeScript
summary
Node.js implements a type stripping runtime that erases TypeScript-only syntax by replacing it with whitespace so source locations stay unchanged, using a customized SWC WebAssembly build wrapped as Amaro. The staged rollout lands an experimental flag (experimental-strip-types in Node 22.6, enabled by default in 23.6) after a PR that landed in 20 days; it supports most erased syntax fast but rejects enums/namespaces unless experimental-transform-types (with source maps) is enabled and forbids running .ts inside node_modules.
AI-written summary · about
chapters (8)
- 0:00Introduction to Native TypeScript in Node.js
- 3:56Challenges in Implementing TypeScript in Node.js
- 7:18TypeStripping: Implementing TypeScript in Node.js
- 10:48TypeStripping: How It Works and the Amaro Package
- 13:48Experimental Strip Types and Transform Types
- 15:19TypeScript Limitations and Code Migration
- 18:37TypeScript Import Types and Syntax Detection
- 21:57Ambiguity in Syntax and Future Steps
related talks
32mIntroducing TypeScript
24mTypeScript and how I've learned to love the compiler
19mYou don't know TS: often unknown parts of TypeScript
50mTypeScript for C++ programmers
49mModern TypeScript is amazing!
24mTypeScript - You'll Like It
20mTypeScript and ES6
33mHow Does the TypeScript Team Try to Avoid Negative Effects on the JS Ecosystem
