Do not reduce subtypes of awaited union type

This commit is contained in:
Ron Buckton
2017-10-16 14:26:16 -07:00
parent 22769d95e1
commit 9563246993
5 changed files with 252 additions and 1 deletions

View File

@@ -19680,7 +19680,7 @@ namespace ts {
return undefined;
}
return typeAsAwaitable.awaitedTypeOfType = getUnionType(types, /*subtypeReduction*/ true);
return typeAsAwaitable.awaitedTypeOfType = getUnionType(types);
}
const promisedType = getPromisedTypeOfPromise(type);