Merge pull request #19230 from Microsoft/fix18186

Do not reduce subtypes of awaited union type
This commit is contained in:
Ron Buckton
2017-10-16 15:17:30 -07:00
committed by GitHub
5 changed files with 252 additions and 1 deletions

View File

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