-
Notifications
You must be signed in to change notification settings - Fork 12.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Promise.allSettled type problem #49344
Comments
Neither |
See also #16655 for |
I already have some workaround for those, but i am still not convinced that this is not an issue (especially for filter if not for Promise Result types)? Shouldn't Typescript compiler already infers the types for filtering with Some of those workarounds for filter are below code and i can make it work also with const numbers = [1, 2, 3, 4, null];
numbers.filter((num): num is number => num !== null); |
See #38390. |
This code gives me some null errors even though i filtered the array.
Type 'number | null' is not assignable to type 'number'.
And also below code gives me
Property 'value' does not exist on type 'PromiseRejectedResult'.
even though i filtered for fulfilled promise results.The text was updated successfully, but these errors were encountered: