
Product
Socket for Asana Is Now Available
Create and manage Asana tasks directly from Socket alerts, with manual task creation, automated ticketing rules, and two-way sync.
oxc-transform
Advanced tools
This is alpha software and may yield incorrect results, feel free to submit a bug report.
import assert from 'assert';
import { transform } from 'oxc-transform';
const { code, declaration, errors } = transform(
'test.ts',
'class A<T> {}',
{
typescript: {
declaration: true, // With isolated declarations in a single step.
},
},
);
// or `await transformAsync(filename, code, options)`
assert.equal(code, 'class A {}\n');
assert.equal(declaration, 'declare class A<T> {}\n');
assert(errors.length == 0);
Conforms to TypeScript compiler's --isolatedDeclarations .d.ts emit.
import assert from 'assert';
import { isolatedDeclaration } from 'oxc-transform';
const { map, code, errors } = isolatedDeclaration('test.ts', 'class A {}');
assert.equal(code, 'declare class A {}\n');
assert(errors.length == 0);
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;
See https://stackblitz.com/edit/oxc-transform for usage example.
FAQs
Oxc Transformer Node API
The npm package oxc-transform receives a total of 3,216,560 weekly downloads. As such, oxc-transform popularity was classified as popular.
We found that oxc-transform demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Create and manage Asana tasks directly from Socket alerts, with manual task creation, automated ticketing rules, and two-way sync.

Security News
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.