

869: Node + TypeScript in 2025
37 snips Jan 20, 2025
Scott and Wes dive into the experimental integration of TypeScript in Node, dissecting the nuances of type stripping versus compilation. They reveal the current limitations of Node's type stripping implementation and highlight tools such as tsx and ts-node. The duo also examines alternative environments like Deno and Bun, discussing their evolving roles and benefits for developers. Together, they navigate the intricacies of configuration, debugging, and the exciting advancements in TypeScript that promise to enhance the developer experience.
AI Snips
Chapters
Transcript
Episode notes
TypeScript and JavaScript Engines
- JavaScript engines don't understand TypeScript; they only understand JavaScript.
- TypeScript must be either compiled into JavaScript or have its types stripped for a JavaScript engine to run it.
Type Stripping vs. Compiling
- Type stripping removes type information without type checking.
- Compiling transforms TypeScript, including handling JSX and polyfills.
Node.js and Type Stripping
- Node.js currently uses type stripping, allowing direct execution of .ts files.
- This approach limits the use of TypeScript features that require transformation, like enums.