Running TypeScript with plain node in 2026: what type stripping still rejects (tested on Node 22, 24, 26)
programming.dev
Running TypeScript with plain node in 2026: what type stripping still rejects (tested on Node 22, 24, 26)
I wrote this one (my own blog). I tested node app.ts with no tsx or build step on Node 22.20, 24.22 and 26.13. Interfaces, generics, as casts and import type just work. Enums, namespaces, parameter properties, decorators, .tsx files and extensionless imports all fail, with the exact errors in the post, plus a tsconfig (erasableSyntaxOnly, verbatimModuleSyntax) that catches them before runtime. Note that --experimental-transform-types is gone in Node 26. Happy to hear if anyone is running this in production and hit other edges.
0 comments
No comments yet.