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
It seems some Promise.all inferencing has changed in 4.5., as I have some patterns in GitLens where I am building an array in the call to Promise.all where some of the promises might be undefined. And in TS 4.5. I now get a Expected 1 type arguments, but got 2 error.
🔎 Search Terms
🕗 Version & Regression Information
This is a crash
This changed between versions 4.4.4 and 4.5-beta and still present in 4.6.0-dev.20211102.
This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
I was unable to test this on prior versions because _______
Another way is to specify types that you have in arguments. Promise.all<[Promise<GitBranch[]> | undefined, Promise<GitTag[]> | undefined]> then first overload will be used.
Maybe we should call this out more explicitly in the stable blog post. There’s a section about the broader Promise/Awaited changes but the type parameter change isn’t specifically mentioned.
Bug Report
It seems some
Promise.all
inferencing has changed in 4.5., as I have some patterns in GitLens where I am building an array in the call toPromise.all
where some of the promises might beundefined
. And in TS 4.5. I now get aExpected 1 type arguments, but got 2
error.🔎 Search Terms
🕗 Version & Regression Information
4.4.4
and4.5-beta
and still present in4.6.0-dev.20211102
.⏯ Playground Link
Playground link with relevant code
💻 Code
Output
Compiler Options
🙁 Actual behavior
Got
Expected 1 type arguments, but got 2
on thePromise.all
call.🙂 Expected behavior
No errors like in TS 4.4.4 and prior
The text was updated successfully, but these errors were encountered: