(components: CodeComponent[])
| 549 | } |
| 550 | |
| 551 | function dedupeComponents(components: CodeComponent[]): CodeComponent[] { |
| 552 | const seen = new Set<string>(); |
| 553 | return components.filter((component) => { |
| 554 | const key = `${component.name}:${component.startLine}:${component.endLine}:${component.componentType}`; |
| 555 | if (seen.has(key)) { |
| 556 | return false; |
| 557 | } |
| 558 | seen.add(key); |
| 559 | return true; |
| 560 | }); |
| 561 | } |
| 562 | |
| 563 | function walkAst( |
| 564 | root: TSESTree.Node | TSESTree.Node[], |
no test coverage detected