blob: f517dcc4b556baf81593150bc7cd2458ecffed4c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#![deny(unused_variables)]
use wasm_bindgen::prelude::*;
struct A {}
#[wasm_bindgen]
impl A {
#[wasm_bindgen(method)]
pub fn foo() {}
}
#[wasm_bindgen]
pub struct MyStruct {
hello: String,
}
#[wasm_bindgen(getter, typescript_custom_section)]
pub const FOO: &'static str = "FOO";
#[wasm_bindgen(readonly)]
pub fn bar() {}
#[wasm_bindgen(getter_with_clone, final)]
impl MyStruct {
#[wasm_bindgen(getter, typescript_type = "Thing[]")]
pub fn hello(&self) -> String {
self.hello.clone()
}
}
fn main() {}
|