* Get identifier of object spread assignment * @returns {null | object}
(scope, node)
| 47 | * @returns {null | object} |
| 48 | */ |
| 49 | function getDestructuringAssignmentParent(scope, node) { |
| 50 | const declaration = scope.set.get(node.name); |
| 51 | if ( |
| 52 | !declaration || |
| 53 | !declaration.defs || |
| 54 | declaration.defs.length === 0 || |
| 55 | declaration.defs[0].type !== 'Variable' || |
| 56 | !declaration.defs[0].node.init |
| 57 | ) { |
| 58 | return null; |
| 59 | } |
| 60 | return declaration.defs[0].node.init; |
| 61 | } |
| 62 | |
| 63 | const parentSelectors = [ |
| 64 | // We want to select identifiers that refer to other references, not the ones |
no test coverage detected
searching dependent graphs…