0.58.1 • Published 7 months ago

oxc-transform v0.58.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 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

9 months ago

0.41.0

10 months ago

0.38.0

10 months ago

0.57.0

7 months ago

0.36.0

11 months ago

0.55.0

7 months ago

0.53.0

7 months ago

0.51.0

8 months ago

0.48.2

8 months ago

0.48.0

8 months ago

0.48.1

8 months ago

0.46.0

9 months ago

0.44.0

9 months ago

0.42.0

10 months ago

0.40.0

10 months ago

0.40.1

10 months ago

0.56.5

7 months ago

0.39.0

10 months ago

0.58.1

7 months ago

0.56.3

7 months ago

0.56.4

7 months ago

0.37.0

10 months ago

0.56.1

7 months ago

0.58.0

7 months ago

0.56.2

7 months ago

0.35.0

11 months ago

0.56.0

7 months ago

0.54.0

7 months ago

0.52.0

7 months ago

0.50.0

8 months ago

0.47.1

8 months ago

0.49.0

8 months ago

0.47.0

8 months ago

0.45.0

9 months ago

0.34.0

11 months ago

0.33.0

11 months ago

0.30.5

1 year ago

0.30.4

1 year ago

0.30.3

1 year ago

0.32.0

12 months ago

0.30.2

1 year ago

0.31.0

12 months ago

0.30.1

1 year ago

0.30.0

1 year ago

0.29.0

1 year ago

0.28.0

1 year ago

0.27.0

1 year ago

0.26.0

1 year ago

0.25.0

1 year ago

0.24.3

1 year ago

0.24.2

1 year ago

0.24.1

1 year ago

0.23.0

1 year ago

0.22.1

1 year ago

0.22.0

1 year ago

0.21.0

1 year ago

0.20.0

1 year ago

0.19.0

1 year ago

0.18.0

1 year ago

0.17.2

1 year ago

0.17.1

1 year ago

0.17.0

1 year ago

0.16.3

1 year ago

0.16.2

1 year ago

0.16.1

1 year ago

0.16.0

1 year ago

0.15.1

1 year ago

0.15.0

1 year ago

0.0.1

1 year ago