mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-14 05:21:24 +00:00
Support #[wasm_bindgen(setter, js_name = ...)]
Previously we'd require the explicit `js_name` to *also* start with `set_`, but when explicitly specified it shouldn't be mangled at all! Closes #584
This commit is contained in:
@ -689,6 +689,7 @@ fn function_from_decl(
|
||||
ast::Function {
|
||||
name: js_name.map(|s| s.0.to_string()).unwrap_or(decl_name.to_string()),
|
||||
name_span: js_name.map(|s| s.1).unwrap_or(decl_name.span()),
|
||||
renamed_via_js_name: js_name.is_some(),
|
||||
arguments,
|
||||
ret,
|
||||
rust_vis: vis,
|
||||
|
Reference in New Issue
Block a user