You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Typescript declaration files that are generated, the struct docstrings are included but the method docstrings aren't. It would be great if methods were documented too.
馃捇 Basic example
Rust:
/// The context object containing the state.#[wasm_bindgen]pubstructComposeArea{window: web_sys::Window,document: web_sys::Document,wrapper_id:String,selection_range:Option<Range>,}#[wasm_bindgen]implComposeArea{/// Insert plain text at the current caret position.pubfninsert_text(&mutself,text:&str){let text_node = self.document.create_text_node(text);self.insert_node(text_node.unchecked_ref());}}
Current type declaration:
/*** The context object containing the state.*/exportclassComposeArea{insert_text(text: string): void;}
Desired type declaration:
/*** The context object containing the state.*/exportclassComposeArea{/** * Insert plain text at the current caret position. */insert_text(text: string): void;}
The text was updated successfully, but these errors were encountered:
Thanks for the report! I've transferred this issue to the wasm-bindgen repository since this is where the fix will go, but I believe this is definitely something we should fix!
wasm-bindgen already generates docs for JS and it shouldn't be too difficult to implement it for TS. If no one is going to take on this issue, I will gladly send a PR.
馃挕 Feature description
In the Typescript declaration files that are generated, the struct docstrings are included but the method docstrings aren't. It would be great if methods were documented too.
馃捇 Basic example
Rust:
Current type declaration:
Desired type declaration:
The text was updated successfully, but these errors were encountered: