Skip to content

Commit 5108e60

Browse files
committed
Remove odd check for TypeFlags.NotUnionOrUnit
1 parent 1a02e73 commit 5108e60

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

src/compiler/checker.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21155,9 +21155,6 @@ namespace ts {
2115521155
assumeTrue ? TypeFacts.EQUndefined : TypeFacts.NEUndefined;
2115621156
return getTypeWithFacts(type, facts);
2115721157
}
21158-
if (type.flags & TypeFlags.NotUnionOrUnit) {
21159-
return type;
21160-
}
2116121158
if (assumeTrue) {
2116221159
const filterFn: (t: Type) => boolean = operator === SyntaxKind.EqualsEqualsToken ?
2116321160
(t => areTypesComparable(t, valueType) || isCoercibleUnderDoubleEquals(t, valueType)) :

src/compiler/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4870,7 +4870,6 @@ namespace ts {
48704870
// 'Narrowable' types are types where narrowing actually narrows.
48714871
// This *should* be every type other than null, undefined, void, and never
48724872
Narrowable = Any | Unknown | StructuredOrInstantiable | StringLike | NumberLike | BigIntLike | BooleanLike | ESSymbol | UniqueESSymbol | NonPrimitive,
4873-
NotUnionOrUnit = Any | Unknown | ESSymbol | Object | NonPrimitive,
48744873
/* @internal */
48754874
NotPrimitiveUnion = Any | Unknown | Enum | Void | Never | StructuredOrInstantiable,
48764875
// The following flags are aggregated during union and intersection type construction

0 commit comments

Comments
 (0)