Skip to content

@oxc-parser/binding-wasm32-wasi returns parsed program as string #9783

@hi-ogawa

Description

@hi-ogawa

reproduction: https://stackblitz.com/github/hi-ogawa/reproductions/tree/main/oxc-wasi-vite?file=src%2Fmain.js
(Github repo https://github.com/hi-ogawa/reproductions/tree/main/oxc-wasi-vite)

I tested @oxc-parser/binding-wasm32-wasi on browser and ParseResult.program is returned as raw string.

const lib = await import("@oxc-parser/binding-wasm32-wasi/parser.wasi-browser.js");
const result = lib.parseSync("test.js", `let foo`);
const program = result.program;
console.log(typeof program)  // => 'string'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions