Hi @lmammino and @mariocasciaro,
Thanks for the book, really enjoying it so far.
Just wanted to flag that the "Using TypeScript with Node.js" section (page 18-19) is a bit outdated now. It describes tsc, ts-node, and tsx as the main ways to run .ts files, but Node.js can now run TypeScript files directly with no setup at all:
node app.ts
This is called type stripping. It became stable in Node 24 (enabled by default since Node 23.6). Node just removes the type annotations and runs the plain JavaScript underneath, using a module called amaro.
One thing worth mentioning if you update this: type stripping doesn't actually check your types, it just removes them. So tsc is still needed for real type checking, this just replaces the need for ts-node/tsx when you simply want to run a file.
Thanks again for the book!
Hi @lmammino and @mariocasciaro,
Thanks for the book, really enjoying it so far.
Just wanted to flag that the "Using TypeScript with Node.js" section (page 18-19) is a bit outdated now. It describes tsc, ts-node, and tsx as the main ways to run .ts files, but Node.js can now run TypeScript files directly with no setup at all:
node app.ts
This is called type stripping. It became stable in Node 24 (enabled by default since Node 23.6). Node just removes the type annotations and runs the plain JavaScript underneath, using a module called amaro.
One thing worth mentioning if you update this: type stripping doesn't actually check your types, it just removes them. So tsc is still needed for real type checking, this just replaces the need for ts-node/tsx when you simply want to run a file.
Thanks again for the book!