Closed
Description
To reproduce
- Run
wasm-bindgen --target web
on the wasm generated from the following library:use wasm_bindgen::prelude::*; #[wasm_bindgen] pub enum Hand { Left = 0, Righ = 1, } #[wasm_bindgen] pub fn f(h: Hand) -> Hand { h }
- Inspect generated .d.ts
Expected result
export enum Hand {
Left,
Righ,
}
export function f(h: Hand): Hand;
Actual result
export enum Hand {
Left,
Righ,
}
export function f(h: number): number;
Version info
wasm-bindgen 0.2.62