Amaro v1.0.0 stabilizes Node.js's official type-stripping loader and advances native .ts loading. Amaro wraps @swc/wasm-typescript, a WebAssembly port of the SWC TypeScript parser that Node uses internally for type stripping. As a global loader, Amaro can process TypeScript files inside node_modules, unlike current experimental Node support. Amaro offers strip-types (default) to remove type annotations and transform-types for complex transformations such as enums. Native TypeScript execution became available starting Node 23.6. Community reactions are generally positive but cautious about production readiness and LTS availability; some teams report successful production use with proper typecheck configurations.
The Node.js team recently released Amaro v1.0.0, a significant milestone towards stable TypeScript support. Amaro is Node's official type-stripping loader and is a key stepping stone towards official .ts loading. For a long time, Node.js lacked support for TypeScript, forcing developers to rely on third-party toolchains or to favor alternative JavaScript runtimes like Deno, which natively supports TypeScript. Then, starting version 23.6 (shipped in January this year), developers could run TypeScript natively in Node.js. Amaro's move to stable status brings Node a step further towards stable TypeScript support.
Amaro is a wrapper around @swc/wasm-typescript, a WebAssembly port of the SWC TypeScript parser. SWC is used internally by Node.js for type stripping. One of Amaro's key features is its ability to process TypeScript files within node_modules when used as a global loader, a notable advantage over Node.js's current experimental support. It also supports two modes: strip-types, which is the default and only removes type annotations, and transform-types, for more complex transformations like enums.
In a Reddit thread discussing the use of native type stripping in production, some developers expressed concerns about production readiness: I'm sorry but do the "stable" version of that feature exist in any Node LTS??? If not how can we use it in "production" ???kei_ichi Despite these reservations, some developers are already successfully leveraging the feature: It has been unflagged in 23.x, so naturally it is in 24. I'm using it in production with 22 and zero issues (provided that you have a properly configured typecheck with eraseableSyntaxOnly
Collection
[
|
...
]