Merge pull request #4535 from Microsoft/fixAsyncCallResolutionException
Fixes fallback checks that cause an exception during call resolution …
This commit is contained in:
commit
9866172623
1 changed files with 3 additions and 3 deletions
|
@ -4036,7 +4036,7 @@ namespace ts {
|
|||
*/
|
||||
function createTypedPropertyDescriptorType(propertyType: Type): Type {
|
||||
let globalTypedPropertyDescriptorType = getGlobalTypedPropertyDescriptorType();
|
||||
return globalTypedPropertyDescriptorType !== emptyObjectType
|
||||
return globalTypedPropertyDescriptorType !== emptyGenericType
|
||||
? createTypeReference(<GenericType>globalTypedPropertyDescriptorType, [propertyType])
|
||||
: emptyObjectType;
|
||||
}
|
||||
|
@ -9176,7 +9176,7 @@ namespace ts {
|
|||
function createPromiseType(promisedType: Type): Type {
|
||||
// creates a `Promise<T>` 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(<GenericType>globalPromiseType, [promisedType]);
|
||||
|
@ -14633,7 +14633,7 @@ namespace ts {
|
|||
|
||||
function createInstantiatedPromiseLikeType(): ObjectType {
|
||||
let promiseLikeType = getGlobalPromiseLikeType();
|
||||
if (promiseLikeType !== emptyObjectType) {
|
||||
if (promiseLikeType !== emptyGenericType) {
|
||||
return createTypeReference(<GenericType>promiseLikeType, [anyType]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue