( node: Node )
| 839 | |
| 840 | // e.g. `T!` and `T!.and` for `T` |
| 841 | export const operatorOf = ( |
| 842 | node: Node |
| 843 | ): [operand: Node, operator: Node | undefined] => { |
| 844 | while ( |
| 845 | node.parent && |
| 846 | (isTransparent(node.parent) || node.parent.type === "ChainExpression") |
| 847 | ) |
| 848 | node = node.parent |
| 849 | return [node, node.parent ?? undefined] |
| 850 | } |
| 851 | |
| 852 | // e.g. `o.a` in `o.a = 1`, `delete o.a` or `({ x: o.a } = p)` |
| 853 | export const isWriteTarget = (node: Node): boolean => { |
no test coverage detected