Skip to content

Avoid Promise<Awaited<T>> in return type inference #45925

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

Merged
merged 1 commit into from
Sep 22, 2021
Merged

Avoid Promise<Awaited<T>> in return type inference #45925

merged 1 commit into from
Sep 22, 2021

Conversation

rbuckton
Copy link
Member

This avoids introducing Awaited<T> in undesired places (essentially, only as part of an await) so that we don't end up with Promise<Awaited<T>>, which was causing issues with return type inference and return type checking.

Fixes part of #45846
Fixes #45924

@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Sep 17, 2021
@rbuckton rbuckton merged commit 4c0a51e into main Sep 22, 2021
@rbuckton rbuckton deleted the fix45924 branch September 22, 2021 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect handling of ReturnStatement check in an async function
3 participants