Skip to content

Transformer ​

Features ​

Installation ​

Node.js ​

Use the experimental node binding oxc-transform.

Rust ​

Use the umbrella crate oxc with the transformer feature.

Rust usage example can be found here.

API Example ​

javascript
import { transform } from "oxc-transform";
const transformed = transform(filePath, sourceCode, {
  typescript: {
    onlyRemoveTypeImports: true,
    declaration: { stripInternal: true },
  },
});
await fs.writeFile("out.js", transformed.code);
await fs.writeFile("out.d.ts", transformed.declaration);

Isolated Declarations ​

Released under the MIT License.