We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JS type for enum string is not generated.
Rust code is bellow.
use wasm_bindgen::prelude::wasm_bindgen; #[wasm_bindgen] pub enum MyEnum { One = "one", Two = "two", Three = "three", } #[wasm_bindgen] pub fn get_enum() -> MyEnum { MyEnum::One }
Generated *.d.ts code is bellow.
/* tslint:disable */ /* eslint-disable */ /** * @returns {any} */ export function get_enum(): any;
enum string should be
enum MyEnum { One = "one", Two = "two", Three = "three", }
enum string always be any.
any
The text was updated successfully, but these errors were encountered:
Duplicate of #2153.
Also, the next release will include #4180, so the .d.ts will then look like this:
.d.ts
/* tslint:disable */ /* eslint-disable */ type MyEnum = "one" | "two" | "three"; export function get_enum(): MyEnum;
Sorry, something went wrong.
@RunDevelopment Oh, I got it. Thank you :)
No branches or pull requests
Describe the Bug
JS type for enum string is not generated.
Rust code is bellow.
Generated *.d.ts code is bellow.
Steps to Reproduce
Expected Behavior
enum string should be
Actual Behavior
enum string always be
any
.Additional Context
The text was updated successfully, but these errors were encountered: