- Requires Node.js v23.6.0 or later.
- All the TypeScript code in this repository is run directly by Node.js, via type stripping.
- Limitation: Type stripping is not supported in packages. Therefore, we can only write apps directly in TypeScript and have to transpile packages.
cd nodejs-type-stripping/
npm install
npm run play
- Edit
src/playground.ts
. Whenever you save that file, Node.js runs it again and displays its output.
- 2ality blog post “Simple TypeScript playground via
node --watch
” - “Modules: TypeScript” in the Node.js documentation
- Blog post “Node’s new built-in support for TypeScript” on 2ality.com
- Blog post “A guide to
tsconfig.json
” on 2ality.com