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