(hits: readonly SymbolSearchHit[], hop: BugPathNode)
| 708 | * when no reading named a file. |
| 709 | */ |
| 710 | export function pickHit(hits: readonly SymbolSearchHit[], hop: BugPathNode): SymbolSearchHit | undefined { |
| 711 | if (hop.qualifiedName !== undefined) { |
| 712 | const exact = hits.find((hit) => hit.qualifiedName === hop.qualifiedName); |
| 713 | if (exact !== undefined) { |
| 714 | return exact; |
| 715 | } |
| 716 | } |
| 717 | if (hop.filePath !== undefined) { |
| 718 | const inFile = hits.find((hit) => hit.filePath === hop.filePath && hit.name === hop.name); |
| 719 | if (inFile !== undefined) { |
| 720 | return inFile; |
| 721 | } |
| 722 | } |
| 723 | return hits.find((hit) => hit.name === hop.name); |
| 724 | } |
no outgoing calls
no test coverage detected