0.58.1 • Published 3 months ago

oxc-transform v0.58.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Oxc Transform

This is alpha software and may yield incorrect results, feel free to submit a bug report.

TypeScript and React JSX Transform

import assert from 'assert';
import oxc from 'oxc-transform';

const { code, declaration, errors } = oxc.transform(
  'test.ts',
  'class A<T> {}',
  {
    typescript: {
      declaration: true, // With isolated declarations in a single step.
    },
  },
);

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

Isolated Declarations for Standalone DTS Emit

Conforms to TypeScript Compiler's --isolated-declaration .d.ts emit.

Usage

import assert from 'assert';
import oxc from 'oxc-transform';

const { map, code, errors } = oxc.isolatedDeclaration('test.ts', 'class A {}');

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

API

See index.d.ts.

export declare function transform(
  filename: string,
  sourceText: string,
  options?: TransformOptions,
): TransformResult;

export function isolatedDeclaration(
  filename: string,
  sourceText: string,
  options?: IsolatedDeclarationsOptions,
): IsolatedDeclarationsResult;
0.43.0

6 months ago

0.41.0

6 months ago

0.38.0

7 months ago

0.57.0

3 months ago

0.36.0

7 months ago

0.55.0

3 months ago

0.53.0

4 months ago

0.51.0

4 months ago

0.48.2

4 months ago

0.48.0

5 months ago

0.48.1

5 months ago

0.46.0

5 months ago

0.44.0

6 months ago

0.42.0

6 months ago

0.40.0

6 months ago

0.40.1

6 months ago

0.56.5

3 months ago

0.39.0

6 months ago

0.58.1

3 months ago

0.56.3

3 months ago

0.56.4

3 months ago

0.37.0

7 months ago

0.56.1

3 months ago

0.58.0

3 months ago

0.56.2

3 months ago

0.35.0

7 months ago

0.56.0

3 months ago

0.54.0

3 months ago

0.52.0

4 months ago

0.50.0

4 months ago

0.47.1

5 months ago

0.49.0

4 months ago

0.47.0

5 months ago

0.45.0

5 months ago

0.34.0

8 months ago

0.33.0

8 months ago

0.30.5

9 months ago

0.30.4

9 months ago

0.30.3

9 months ago

0.32.0

8 months ago

0.30.2

9 months ago

0.31.0

8 months ago

0.30.1

9 months ago

0.30.0

9 months ago

0.29.0

9 months ago

0.28.0

9 months ago

0.27.0

9 months ago

0.26.0

9 months ago

0.25.0

10 months ago

0.24.3

10 months ago

0.24.2

10 months ago

0.24.1

10 months ago

0.23.0

11 months ago

0.22.1

11 months ago

0.22.0

11 months ago

0.21.0

11 months ago

0.20.0

11 months ago

0.19.0

11 months ago

0.18.0

11 months ago

0.17.2

11 months ago

0.17.1

11 months ago

0.17.0

11 months ago

0.16.3

12 months ago

0.16.2

12 months ago

0.16.1

12 months ago

0.16.0

12 months ago

0.15.1

12 months ago

0.15.0

12 months ago

0.0.1

12 months ago