* One pointer line: the file plus enough symbol names to make it NAMEABLE in a * follow-up explore. Capped — an un-capped list ran to ~1.9K on the #1500 * fixture (12 generated CRUD symbols on one line), meta-text bought at the * price of the source bytes this section exists to point away from.
(filePath: string, nodes: readonly Node[])
| 1222 | * price of the source bytes this section exists to point away from. |
| 1223 | */ |
| 1224 | function pointerLineFor(filePath: string, nodes: readonly Node[]): string { |
| 1225 | const POINTER_SYMBOLS = 6; |
| 1226 | const named = nodes.filter((n) => n.kind !== 'import' && n.kind !== 'export'); |
| 1227 | const pool = named.length > 0 ? named : nodes; |
| 1228 | const shown = pool.slice(0, POINTER_SYMBOLS); |
| 1229 | const more = pool.length - shown.length; |
| 1230 | const symbols = shown.map((n) => `${n.name}:${n.startLine}`).join(', ') |
| 1231 | + (more > 0 ? `, +${more} more` : ''); |
| 1232 | return `- ${filePath}: ${symbols}`; |
| 1233 | } |
| 1234 | /** |
| 1235 | * Emitted when the response was too full to carry ANY of its pointer list. It |
| 1236 | * is the one line the epilogue floor is reserved for: the list itself can be |
no test coverage detected