oxc/npm/oxc-transform
2024-06-18 22:12:47 +08:00
..
scripts feat(npm/oxc-transform): setup npm/oxc-transform and publish 2024-06-18 22:12:47 +08:00
package.json feat(npm/oxc-transform): setup npm/oxc-transform and publish 2024-06-18 22:12:47 +08:00
README.md feat(npm/oxc-transform): setup npm/oxc-transform and publish 2024-06-18 22:12:47 +08:00

The JavaScript Oxidation Compiler

See index.d.ts for parseSync and parseAsync API.

ESM

import oxc from './index.js';
import assert from 'assert';

test(oxc.isolatedDeclaration("test.ts", "class A {}"), "declare class A {}\n");

function test(ret, expected) {
  assert.equal(ret.sourceText, expected);
  assert(ret.errors.length == 0);
}