Add a #[wasm_bindgen(constructor)] attribute

This can be used for specifying that a static function should actually delegate
to `new`
This commit is contained in:
Alex Crichton
2018-02-06 15:19:47 -08:00
parent e60aa6a990
commit ec5f0a29f7
6 changed files with 131 additions and 24 deletions

View File

@ -33,6 +33,7 @@ pub struct ImportStruct {
#[derive(Serialize, Deserialize)]
pub struct ImportStructFunction {
pub method: bool,
pub js_new: bool,
pub function: Function,
}