Skip to content

Inheritance & Generics #4087

Answered by daxpedda
Sellig6792 asked this question in Q&A
Aug 21, 2024 · 1 comments · 5 replies
Discussion options

You must be logged in to vote
#[wasm_bindgen(raw_module = "./cazan.js")]
extern "C" {
    pub type Graphic;
    #[wasm_bindgen(extends = Graphic)]
    pub type Circle;
    #[wasm_bindgen(extends = Graphic)]
    pub type Ellipse;
    #[wasm_bindgen(extends = Graphic)]
    pub type Line;
    #[wasm_bindgen(extends = Graphic)]
    pub type Rectangle;
}

Does the trick for me.
See the wasm-bindgen Guide on this topic.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Sellig6792
Comment options

@daxpedda
Comment options

@Sellig6792
Comment options

@daxpedda
Comment options

Answer selected by Sellig6792
@Sellig6792
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants
Converted from issue

This discussion was converted from issue #4086 on August 21, 2024 14:57.