Skip to content

Conversation

rbuckton
Copy link
Contributor

await should only produce Awaited<T> when T's base constraint is any, unknown, {}, or object, or when T is an unconstrained generic. Prior to this change, a Record type with a generic key would satisfy the isGenericObjectType condition, but would have no base constraint, resulting in the introduction of an unnecessary Awaited wrapper around the type.

Fixes #47144

@typescript-bot typescript-bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Jul 29, 2022
@rbuckton rbuckton merged commit 55f2c0c into main Aug 1, 2022
@rbuckton rbuckton deleted the fix47144 branch August 1, 2022 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Awaited<T> not resolved to T when T is a generic type
3 participants