# oxc-transform

> Oxc Transformer Node API

Latest version **0.154.0** (published 2026-10-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install oxc-transform
pnpm add oxc-transform
yarn add oxc-transform
bun add oxc-transform
```

## Health

**Score 60/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score; popular repo.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.154.0 |
| Published | 2026-10-13 |
| First published | 2024-06-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23065 |
| Author | Boshen and oxc contributors |
| Maintainers | boshen |
| Keywords | babel, javascript, jsx, oxc, transform, transformer, tsx, typescript |

## Links

- npm: https://www.npmjs.com/package/oxc-transform
- Repository: https://github.com/oxc-project/oxc
- Homepage: https://oxc.rs/docs/guide/usage/transformer
- Issues: https://github.com/oxc-project/oxc/issues
- Funding: https://github.com/sponsors/oxc-project
- npm.io page: https://npm.io/package/oxc-transform

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.154.0 (latest) — 2026-10-13
- 0.153.0 — 2026-10-05
- 0.152.0 — 2026-09-29
- 0.151.0 — 2026-09-21
- 0.150.0 — 2026-09-14
- 0.149.0 — 2026-09-07
- 0.148.0 — 2026-09-01
- 0.147.0 — 2026-08-24
- 0.146.0 — 2026-08-19
- 0.145.0 — 2026-08-18
- 0.144.0 — 2026-08-10
- 0.143.0 — 2026-08-03
- 0.142.0 — 2026-07-27
- 0.141.0 — 2026-07-21
- 0.140.0 — 2026-07-14
- … 163 more at https://npm.io/package/oxc-transform/versions

## README

# Oxc Transform

See [usage instructions](https://oxc.rs/docs/guide/usage/transformer).

## TypeScript and React JSX Transform

```javascript
import assert from "node:assert";
import { transformSync } from "oxc-transform";

const { code, declaration, errors } = transformSync("test.ts", "class A<T> {}", {
  typescript: {
    declaration: true, // With isolated declarations in a single step.
  },
});
// or `await transform(filename, code, options)`

assert.equal(code, "class A {}\n");
assert.equal(declaration, "declare class A<T> {}\n");
assert(errors.length == 0);
```

## [Isolated Declarations for Standalone DTS Emit](https://devblogs.microsoft.com/typescript/announcing-typescript-5-5/#isolated-declarations)

Conforms to TypeScript compiler's `--isolatedDeclarations` `.d.ts` emit.

### Usage

```javascript
import assert from "node:assert";
import { isolatedDeclarationSync } from "oxc-transform";

const { map, code, errors } = isolatedDeclarationSync("test.ts", "class A {}");
// or `await isolatedDeclaration(filename, code, options)`

assert.equal(code, "declare class A {}\n");
assert(errors.length == 0);
```

### API

#### Transform Functions

```typescript
// Synchronous transform
transformSync(
  filename: string,
  sourceText: string,
  options?: TransformOptions,
): TransformResult

// Asynchronous transform
transform(
  filename: string,
  sourceText: string,
  options?: TransformOptions,
): Promise<TransformResult>
```

#### Isolated Declaration Functions

```typescript
// Synchronous isolated declaration
isolatedDeclarationSync(
  filename: string,
  sourceText: string,
  options?: IsolatedDeclarationsOptions,
): IsolatedDeclarationsResult

// Asynchronous isolated declaration
isolatedDeclaration(
  filename: string,
  sourceText: string,
  options?: IsolatedDeclarationsOptions,
): Promise<IsolatedDeclarationsResult>
```

Use the `Sync` versions for synchronous operations. Use async versions for asynchronous operations, which can be beneficial in I/O-bound or concurrent scenarios, though they add async overhead.

See `index.d.ts` for complete type definitions.

### Supports WASM

See https://stackblitz.com/edit/oxc-transform for usage example.

---
_Source: https://npm.io/package/oxc-transform · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
