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