Skip to content
New issue

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_name does not seem to effect struct values #2331

Closed
hacker112 opened this issue Oct 16, 2020 · 1 comment · Fixed by #2360
Closed

js_name does not seem to effect struct values #2331

hacker112 opened this issue Oct 16, 2020 · 1 comment · Fixed by #2360
Labels

Comments

@hacker112
Copy link

Describe the Bug

js_name does not affect public values in structs like it affects methods.

Steps to Reproduce

Create a struct

#[wasm_bindgen]
pub struct FooBar {
    #[wasm_bindgen(js_name = "spamEggs")]
    pub spam_eggs: u32,
}

Expected Behavior

Should generate JS/TS with name spamEggs just like for methods.

OR throw an error that this is not possible.

Actual Behavior

Generates JS/TS with name spam_eggs as if the js_name attribute would not have been set.

@hacker112 hacker112 added the bug label Oct 16, 2020
@alexcrichton
Copy link
Contributor

Should be easy enough to implement, but agreed that this isn't working today!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants