- Category
- Developer Tools
- Rank
- No. 370Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- nodejs
- GitHub
- 796 stars
- Latest release
- v1.1.11
- Date
About
Node.js's official TypeScript wrapper. Powers built-in TypeScript support in recent Node releases via type-stripping.
What it does
Amaro wraps SWC’s WebAssembly TypeScript parser behind a small, stable JavaScript interface. It can remove type syntax while keeping source positions aligned with whitespace, or transform TypeScript features through Node loader hooks. Applications can register those loaders at startup, including watch-based development workflows.
Why it's ranked here
Its appeal comes from a narrow, credible contract: one parser wrapper, one package, and direct Node integration. Source-position preservation makes stripped output easier to debug, while separate stripping and transformation modes keep behavior explicit. The package also lets projects update the transpiler independently of Node’s bundled copy.
What's good
Stripping replaces removed annotations with spaces, which preserves line and column positions for stack traces. The package supports both direct synchronous transformation and loader-based execution. Conditional exports can point linked monorepo packages at TypeScript sources, avoiding repeated internal rebuilds during local development.
Tradeoffs
Amaro requires Node 22 or newer. Transformation mode needs source maps enabled for accurate stack traces. Its documented TypeScript support is limited to TypeScript 5.8. The public surface is deliberately small, so it is not presented as a broad compiler toolchain, bundler, or project configuration system.
How to use it well
Use Amaro when a Node application needs to execute TypeScript sources directly, especially during monorepo development or watch mode. Choose stripping for erasable type syntax and transformation when runtime TypeScript features need conversion. Keep a separate workflow for type checking, bundling, and producing distributable package outputs.
Technical notes+
src/index.ts re-exports transformSync from the transformation module. package.json defines a CommonJS main entry, bundled declarations, Node >=22, and three export surfaces: the library root plus ./strip and ./transform loader registrations. esbuild.config.mjs bundles src/index.ts for Node 22, builds loader and error modules, and copies registration modules plus embedded library metadata into dist. The repository vendors extensive SWC Rust sources under deps/swc, while the published wrapper is built from TypeScript and JavaScript modules.
Observed
- License
- MIT
- Install surface
- Published as the npm package amaro and installed with npm.
- Interfaces
- JavaScript library API plus separate Node loader exports for stripping and transformation.
- Platform support
- Requires Node.js 22 or newer.
- Primary implementation
- The published wrapper uses TypeScript and JavaScript around a WebAssembly SWC parser.
- Repository structure
- The repository includes vendored SWC Rust source code under deps/swc.
Read from README.md, package.json, src/index.ts, esbuild.config.mjs, commitlint.config.mjs, deps/swc/xtask/src/main.rs, deps/swc/crates/swc/src/lib.rs, deps/swc/crates/hstr/src/lib.rs, deps/swc/crates/jsdoc/src/lib.rs, deps/swc/crates/swc_css/src/lib.rs, deps/swc/crates/ast_node/src/lib.rs, deps/swc/crates/dbg-swc/src/main.rs, deps/swc/crates/swc_core/src/lib.rs, deps/swc/crates/swc_html/src/lib.rs, deps/swc/crates/swc_arena/src/lib.rs.
What it can do
Strip TypeScript type annotations from code
TypeScript source code → JavaScript code without type annotations
Enable TypeScript execution in Node.js runtime
TypeScript files → Executed JavaScript code
Transform TypeScript syntax to JavaScript
TypeScript syntax elements → Equivalent JavaScript syntax
Provide TypeScript compilation interface for Node.js
TypeScript compilation requests → Compiled JavaScript output
Bridge TypeScript tooling with Node.js runtime
TypeScript development workflows → Node.js compatible execution environment
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.
