mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-13 04:51:23 +00:00
Use the JS name of an imported type for instanceof
checks
This commit is contained in:
@ -125,6 +125,7 @@ pub struct ImportStatic {
|
||||
pub struct ImportType {
|
||||
pub vis: syn::Visibility,
|
||||
pub rust_name: Ident,
|
||||
pub js_name: String,
|
||||
pub attrs: Vec<syn::Attribute>,
|
||||
pub doc_comment: Option<String>,
|
||||
pub instanceof_shim: String,
|
||||
@ -411,7 +412,7 @@ impl ImportStatic {
|
||||
impl ImportType {
|
||||
fn shared(&self) -> shared::ImportType {
|
||||
shared::ImportType {
|
||||
name: self.rust_name.to_string(),
|
||||
name: self.js_name.clone(),
|
||||
instanceof_shim: self.instanceof_shim.clone(),
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user