mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-22 05:00:53 +00:00
If the setter doesn't start with `set_*` then we currently panic, but panicking is bad! Instead let's thread through structured errors to make sure they make their way to the top
20 lines
328 B
Rust
20 lines
328 B
Rust
extern crate wasm_bindgen;
|
|
|
|
use wasm_bindgen::prelude::*;
|
|
|
|
#[wasm_bindgen]
|
|
extern "C" {
|
|
type A;
|
|
|
|
#[wasm_bindgen(setter, method)]
|
|
fn a(this: &A, b: i32);
|
|
|
|
#[wasm_bindgen(setter = x, method)]
|
|
fn b(this: &A, b: i32);
|
|
|
|
#[wasm_bindgen(setter, method, js_name = x)]
|
|
fn c(this: &A, b: i32);
|
|
}
|
|
|
|
fn main() {}
|