Skip to content

Commit 37b9aa5

Browse files
Fix invalid TS return types for multivalue signatures (#4210)
1 parent 04d508b commit 37b9aa5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454
* Fixed generated types when a static getter/setter has the same name as an instance getter/setter.
5555
[#4202](https://github.com/rustwasm/wasm-bindgen/pull/4202)
5656

57+
* Fixed invalid TypeScript return types for multivalue signatures.
58+
[#4210](https://github.com/rustwasm/wasm-bindgen/pull/4210)
59+
5760
--------------------------------------------------------------------------------
5861

5962
## [0.2.95](https://github.com/rustwasm/wasm-bindgen/compare/0.2.94...0.2.95)

crates/cli-support/src/wasm2es6js.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ pub fn interface(module: &Module) -> Result<String, Error> {
9999
ret = match ty.results().len() {
100100
0 => "void",
101101
1 => "number",
102-
_ => "Array",
102+
_ => "number[]",
103103
},
104104
));
105105
}
@@ -147,7 +147,7 @@ pub fn typescript(module: &Module) -> Result<String, Error> {
147147
ret = match ty.results().len() {
148148
0 => "void",
149149
1 => "number",
150-
_ => "Array",
150+
_ => "number[]",
151151
},
152152
));
153153
}

0 commit comments

Comments
 (0)