(
node: N.Identifier | N.Pattern | N.RestElement | N.ObjectProperty,
)
| 2756 | } |
| 2757 | |
| 2758 | checkDeclaration( |
| 2759 | node: N.Identifier | N.Pattern | N.RestElement | N.ObjectProperty, |
| 2760 | ): void { |
| 2761 | if (node.type === "Identifier") { |
| 2762 | this.checkDuplicateExports(node, node.name); |
| 2763 | } else if (node.type === "ObjectPattern") { |
| 2764 | for (const prop of node.properties) { |
| 2765 | this.checkDeclaration(prop); |
| 2766 | } |
| 2767 | } else if (node.type === "ArrayPattern") { |
| 2768 | for (const elem of node.elements) { |
| 2769 | if (elem) { |
| 2770 | this.checkDeclaration(elem as N.Pattern | N.Identifier); |
| 2771 | } |
| 2772 | } |
| 2773 | } else if (node.type === "ObjectProperty") { |
| 2774 | this.checkDeclaration(node.value as N.Pattern | N.Identifier); |
| 2775 | } else if (node.type === "RestElement") { |
| 2776 | this.checkDeclaration(node.argument as N.Pattern | N.Identifier); |
| 2777 | } else if (node.type === "AssignmentPattern") { |
| 2778 | this.checkDeclaration( |
| 2779 | node.left as N.AssignmentPattern["left"] & (N.Pattern | N.Identifier), |
| 2780 | ); |
| 2781 | } |
| 2782 | } |
| 2783 | |
| 2784 | checkDuplicateExports( |
| 2785 | node: Undone< |
nothing calls this directly
no test coverage detected