Skip to content

Commit

Permalink
fix(wasm): correct ir type (#5226)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz authored Aug 26, 2024
1 parent 49606ef commit 4641034
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/oxc_wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ pub struct Oxc {
pub ast: JsValue,

#[wasm_bindgen(readonly, skip_typescript)]
#[tsify(type = "Statement[]")]
pub ir: JsValue,
pub ir: String,

#[wasm_bindgen(readonly, skip_typescript)]
#[tsify(type = "SymbolTable")]
Expand Down Expand Up @@ -187,7 +186,7 @@ impl Oxc {

self.save_diagnostics(ret.errors.into_iter().map(Error::from).collect::<Vec<_>>());

self.ir = format!("{:#?}", ret.program.body).into();
self.ir = format!("{:#?}", ret.program.body);

let program = allocator.alloc(ret.program);

Expand Down

0 comments on commit 4641034

Please sign in to comment.