( operand: Node, parent: Node | undefined, module: SourceModule )
| 2418 | ]) |
| 2419 | |
| 2420 | const isNonCallingFunctionRead = ( |
| 2421 | operand: Node, |
| 2422 | parent: Node | undefined, |
| 2423 | module: SourceModule |
| 2424 | ): boolean => { |
| 2425 | if (!parent) return false |
| 2426 | if (parent.type === "ExpressionStatement") return true |
| 2427 | if ( |
| 2428 | parent.type === "UnaryExpression" && |
| 2429 | (parent.operator === "typeof" || |
| 2430 | parent.operator === "!" || |
| 2431 | parent.operator === "void") |
| 2432 | ) |
| 2433 | return true |
| 2434 | if (parent.type === "CallExpression" && parent.callee !== operand) { |
| 2435 | const name = globalNameOf(unwrapExpression(parent.callee), module) |
| 2436 | return !!name && nonCallingGlobals.has(name) |
| 2437 | } |
| 2438 | return false |
| 2439 | } |
| 2440 | |
| 2441 | const collectBindingCalls = ( |
| 2442 | binding: Binding, |
no test coverage detected