Skip to content

Commit b235998

Browse files
committed
Use maybeTypeOfKind
1 parent 2bbdcc8 commit b235998

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12873,7 +12873,7 @@ namespace ts {
1287312873
}
1287412874

1287512875
function filterPrimitivesIfContainsNonPrimitive(type: UnionType) {
12876-
if (some(type.types, t => !!(t.flags & TypeFlags.NonPrimitive))) {
12876+
if (maybeTypeOfKind(type, TypeFlags.NonPrimitive)) {
1287712877
const result = filterType(type, t => !(t.flags & TypeFlags.Primitive));
1287812878
if (!(result.flags & TypeFlags.Never)) {
1287912879
return result;

0 commit comments

Comments
 (0)