diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 35c12dedc3..8c6002af51 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4036,7 +4036,7 @@ namespace ts { */ function createTypedPropertyDescriptorType(propertyType: Type): Type { let globalTypedPropertyDescriptorType = getGlobalTypedPropertyDescriptorType(); - return globalTypedPropertyDescriptorType !== emptyObjectType + return globalTypedPropertyDescriptorType !== emptyGenericType ? createTypeReference(globalTypedPropertyDescriptorType, [propertyType]) : emptyObjectType; } @@ -9176,7 +9176,7 @@ namespace ts { function createPromiseType(promisedType: Type): Type { // creates a `Promise` type where `T` is the promisedType argument let globalPromiseType = getGlobalPromiseType(); - if (globalPromiseType !== emptyObjectType) { + if (globalPromiseType !== emptyGenericType) { // if the promised type is itself a promise, get the underlying type; otherwise, fallback to the promised type promisedType = getAwaitedType(promisedType); return createTypeReference(globalPromiseType, [promisedType]); @@ -14633,7 +14633,7 @@ namespace ts { function createInstantiatedPromiseLikeType(): ObjectType { let promiseLikeType = getGlobalPromiseLikeType(); - if (promiseLikeType !== emptyObjectType) { + if (promiseLikeType !== emptyGenericType) { return createTypeReference(promiseLikeType, [anyType]); }