mirror of
https://github.com/danbulant/oxc
synced 2026-05-20 20:58:48 +00:00
| .. | ||
| src | ||
| .gitignore | ||
| Cargo.toml | ||
| package.json | ||
| pnpm-lock.yaml | ||
| README.md | ||
About
Experimental wasm package for the oxc parser, with full TypeScript typings support.
This package is built with wasm-pack build --release --target web for bundler (webpack / vite) consumption.
Checkout oxc-parser for usage in node.js.
Source code: https://github.com/oxc-project/oxc/tree/main/wasm/parser
🚴 Usage
import initWasm, { parseSync } from "@oxc-parser/wasm";
async function main() {
await initWasm();
const code = "let foo";
const result = parseSync(code, { filename: "test.ts" });
console.log(result);
}
main();