Closed
Description
TypeScript Version: 4.0.0-beta
Search Terms:
variadic tuples promise.all
Code
declare const foo: Promise<string>;
declare const bar: Promise<number>[];
async function m() {
const p = await Promise.all([
foo,
...bar
])
}
Expected behavior:
p
should have type [string, ...number]
Actual behavior:
Type error
Related Issues: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment