TypeScript
TypeScript copied to clipboard
Use base constraint when testing whether a type needs an `Awaited<T>` wrapper
When we updated await to use Awaited<T> in 4.5, we avoided introducing a new Awaited<T> wrapper when T is a generic primitive by calling allTypesAssignableToKind. However, when T is a this type, it triggers a circularity error. This change ensures we check against the base constraint of T rather than T itself, which avoids the circularity.
Fixes #47291