One flagged entry point as a row.
(hit: SymbolSearchHit)
| 87 | |
| 88 | /** One flagged entry point as a row. */ |
| 89 | function rowOfHit(hit: SymbolSearchHit): EntryRow { |
| 90 | return { |
| 91 | key: `symbol:${hit.qualifiedName ?? `${hit.filePath ?? ''}#${hit.name}`}`, |
| 92 | name: hit.name, |
| 93 | where: whereOf(hit.filePath, hit.line), |
| 94 | origin: 'entry point', |
| 95 | ...(hit.filePath === undefined || hit.filePath.length === 0 |
| 96 | ? {} |
| 97 | : { |
| 98 | target: { |
| 99 | name: hit.name, |
| 100 | qualifiedName: hit.qualifiedName, |
| 101 | kind: hit.kind, |
| 102 | filePath: hit.filePath, |
| 103 | startLine: hit.line, |
| 104 | } satisfies DeclarationTarget, |
| 105 | }), |
| 106 | }; |
| 107 | } |
| 108 | |
| 109 | /** One recovered route as a row, with the strength of the reading on it. */ |
| 110 | function rowOfRoute(route: RouteRef): EntryRow { |