Skip to content

Commit 1ea3788

Browse files
committed
Fixes fallback checks that cause an exception during call resolution for an async function
1 parent 90aff0c commit 1ea3788

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4036,7 +4036,7 @@ namespace ts {
40364036
*/
40374037
function createTypedPropertyDescriptorType(propertyType: Type): Type {
40384038
let globalTypedPropertyDescriptorType = getGlobalTypedPropertyDescriptorType();
4039-
return globalTypedPropertyDescriptorType !== emptyObjectType
4039+
return globalTypedPropertyDescriptorType !== emptyGenericType
40404040
? createTypeReference(<GenericType>globalTypedPropertyDescriptorType, [propertyType])
40414041
: emptyObjectType;
40424042
}
@@ -9176,7 +9176,7 @@ namespace ts {
91769176
function createPromiseType(promisedType: Type): Type {
91779177
// creates a `Promise<T>` type where `T` is the promisedType argument
91789178
let globalPromiseType = getGlobalPromiseType();
9179-
if (globalPromiseType !== emptyObjectType) {
9179+
if (globalPromiseType !== emptyGenericType) {
91809180
// if the promised type is itself a promise, get the underlying type; otherwise, fallback to the promised type
91819181
promisedType = getAwaitedType(promisedType);
91829182
return createTypeReference(<GenericType>globalPromiseType, [promisedType]);
@@ -14633,7 +14633,7 @@ namespace ts {
1463314633

1463414634
function createInstantiatedPromiseLikeType(): ObjectType {
1463514635
let promiseLikeType = getGlobalPromiseLikeType();
14636-
if (promiseLikeType !== emptyObjectType) {
14636+
if (promiseLikeType !== emptyGenericType) {
1463714637
return createTypeReference(<GenericType>promiseLikeType, [anyType]);
1463814638
}
1463914639

0 commit comments

Comments
 (0)