Fix issue

This commit is contained in:
Anders Hejlsberg 2018-05-25 09:45:53 -07:00
parent 77bb4f89c0
commit 3f5f8d7bd6

View file

@ -8610,7 +8610,7 @@ namespace ts {
if (!strictNullChecks && includes & TypeFlags.Nullable) {
return includes & TypeFlags.Undefined ? undefinedType : nullType;
}
if (types.length === 0) {
if (typeSet.length === 0) {
return includes & TypeFlags.TopUnion ? getTopType() : emptyObjectType;
}
if (includes & TypeFlags.String && includes & TypeFlags.StringLiteral ||