File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40116,6 +40116,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4011640116 return sourceType;
4011740117 }
4011840118
40119+ function isBoolean(value: any): boolean {
40120+ return (value === typeof "boolean");
40121+ }
40122+
4011940123 /**
4012040124 * This is a *shallow* check: An expression is side-effect-free if the
4012140125 * evaluation of the expression *itself* cannot produce side effects.
@@ -40612,6 +40616,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
4061240616 leftType = getBaseTypeOfLiteralTypeForComparison(checkNonNullType(leftType, left));
4061340617 rightType = getBaseTypeOfLiteralTypeForComparison(checkNonNullType(rightType, right));
4061440618 reportOperatorErrorUnless((left, right) => {
40619+ if (isBoolean(left) || isBoolean(right)) {
40620+ return true;
40621+ }
4061540622 if (isTypeAny(left) || isTypeAny(right)) {
4061640623 return true;
4061740624 }
You can’t perform that action at this time.
0 commit comments