diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bc3bdba01b..3acfc5e262c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,6 +54,9 @@ * Fixed generated types when a static getter/setter has the same name as an instance getter/setter. [#4202](https://github.com/rustwasm/wasm-bindgen/pull/4202) +* Fixed invalid TypeScript return types for multivalue signatures. + [#4210](https://github.com/rustwasm/wasm-bindgen/pull/4210) + -------------------------------------------------------------------------------- ## [0.2.95](https://github.com/rustwasm/wasm-bindgen/compare/0.2.94...0.2.95) diff --git a/crates/cli-support/src/wasm2es6js.rs b/crates/cli-support/src/wasm2es6js.rs index 36298fdd54e..bdf6f020f68 100644 --- a/crates/cli-support/src/wasm2es6js.rs +++ b/crates/cli-support/src/wasm2es6js.rs @@ -99,7 +99,7 @@ pub fn interface(module: &Module) -> Result { ret = match ty.results().len() { 0 => "void", 1 => "number", - _ => "Array", + _ => "number[]", }, )); } @@ -147,7 +147,7 @@ pub fn typescript(module: &Module) -> Result { ret = match ty.results().len() { 0 => "void", 1 => "number", - _ => "Array", + _ => "number[]", }, )); }