(a: Node, b: Node)
| 6833 | const isEq = test.operator === "===" || test.operator === "==" |
| 6834 | const holdsEq = expectTruthy ? isEq : !isEq |
| 6835 | const checkTypeof = (a: Node, b: Node): boolean => { |
| 6836 | const ua = unwrapExpression(a) |
| 6837 | const ub = unwrapExpression(b) |
| 6838 | if ( |
| 6839 | ua.type === "UnaryExpression" && |
| 6840 | ua.operator === "typeof" && |
| 6841 | isBoundId(ua.argument, binding, module) && |
| 6842 | ub.type === "Literal" && |
| 6843 | typeof ub.value === "string" |
| 6844 | ) { |
| 6845 | return holdsEq ? |
| 6846 | ub.value in nonFunctionTypeofs |
| 6847 | : ub.value === "function" |
| 6848 | } |
| 6849 | return false |
| 6850 | } |
| 6851 | if ( |
| 6852 | checkTypeof(test.left, test.right) || |
| 6853 | checkTypeof(test.right, test.left) |
no test coverage detected