Merge pull request #13930 from Microsoft/no-subtype-reduction-in-includeFalsyTypes

No subtype reduction in includeFalsyTypes
This commit is contained in:
Nathan Shively-Sanders
2017-02-13 13:09:07 -08:00
committed by GitHub
5 changed files with 78 additions and 1 deletions

View File

@@ -8592,7 +8592,7 @@ namespace ts {
if (flags & TypeFlags.Void) types.push(voidType);
if (flags & TypeFlags.Undefined) types.push(undefinedType);
if (flags & TypeFlags.Null) types.push(nullType);
return getUnionType(types, /*subtypeReduction*/ true);
return getUnionType(types);
}
function removeDefinitelyFalsyTypes(type: Type): Type {