| 8290 | const header = `**${matches.length} definitions named "${symbol}"**`; |
| 8291 | const indexOrder = new Map(matches.map((n, i) => [n, i] as const)); |
| 8292 | const inIndexOrder = <T>(items: T[], nodeOf: (item: T) => Node): T[] => |
| 8293 | [...items].sort((a, b) => indexOrder.get(nodeOf(a))! - indexOrder.get(nodeOf(b))!); |
| 8294 | const isGenerated = cg.generatedFilePredicate(matches.map((n) => n.filePath)); |
| 8295 | // Generated stubs stay behind every hand-written definition (findSymbolMatches). |
| 8296 | const capOrderOf = (nodes: Node[]): Node[] => [ |