mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 18:20:51 +00:00
Fix TypeScript for generated constructors
It accidentally had a stray colon! Closes #917
This commit is contained in:
parent
7ec1511d3d
commit
157750fd99
@ -713,10 +713,12 @@ impl<'a, 'b> Js2Rust<'a, 'b> {
|
||||
.map(|s| format!("{}: {}", s.0, s.1))
|
||||
.collect::<Vec<_>>()
|
||||
.join(", ");
|
||||
let ts = format!(
|
||||
"{} {}({}): {};\n",
|
||||
prefix, self.js_name, ts_args, self.ret_ty
|
||||
);
|
||||
let mut ts = format!("{} {}({})", prefix, self.js_name, ts_args);
|
||||
if self.constructor.is_none() {
|
||||
ts.push_str(": ");
|
||||
ts.push_str(&self.ret_ty);
|
||||
}
|
||||
ts.push_str(";\n");
|
||||
(js, ts, self.js_doc_comments())
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user