You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A wasm_bindgen function that in Rust returns a Result will generate a function that in JS unwraps the result, returning the Ok value and throwing the Err value. For example:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
A wasm_bindgen function that in Rust returns a Result will generate a function that in JS unwraps the result, returning the Ok value and throwing the Err value. For example:
Exported definition in .d.ts:
What I want is not for the error to be thrown, but to simply return a Result object:
Is there a way to do this with wasm_bindgen?
Beta Was this translation helpful? Give feedback.
All reactions