Open Vlad-Shcherbina opened 4 years ago
Run wasm_bindgen --target web on the wasm produced from the following library:
wasm_bindgen --target web
use wasm_bindgen::prelude::*; #[wasm_bindgen] pub enum Hand { Left = "Left", Right = "Right", } #[wasm_bindgen] pub fn f(h: Hand) -> Hand { h }
export type Hand = 'Left' | 'Right'; export function f(h: Hand): Hand;
/** * @param {any} h * @returns {any} */ export function f(h: any): any;
wasm-bindgen 0.2.62
I unfortunately don't have the time to implement a new feature like this, but a PR would be much appreciated!
To reproduce
Run
wasm_bindgen --target web
on the wasm produced from the following library:Expected Behavior
Actual Behavior
Version info
wasm-bindgen 0.2.62