( name: string, node: TSESTree.FunctionDeclaration | TSESTree.VariableDeclarator | TSESTree.ClassDeclaration, type: string, componentType: string, metadata: Record<string, unknown> )
| 532 | } |
| 533 | |
| 534 | function toComponent( |
| 535 | name: string, |
| 536 | node: TSESTree.FunctionDeclaration | TSESTree.VariableDeclarator | TSESTree.ClassDeclaration, |
| 537 | type: string, |
| 538 | componentType: string, |
| 539 | metadata: Record<string, unknown> |
| 540 | ): CodeComponent { |
| 541 | return { |
| 542 | name, |
| 543 | type, |
| 544 | componentType, |
| 545 | startLine: node.loc?.start.line ?? 1, |
| 546 | endLine: node.loc?.end.line ?? node.loc?.start.line ?? 1, |
| 547 | metadata |
| 548 | }; |
| 549 | } |
| 550 | |
| 551 | function dedupeComponents(components: CodeComponent[]): CodeComponent[] { |
| 552 | const seen = new Set<string>(); |
no outgoing calls
no test coverage detected