| 2263 | if (keyNorm.length < 3) return ''; |
| 2264 | const cands = new Map<string, Node>(); |
| 2265 | const consider = (n: Node | undefined | null) => { |
| 2266 | if (!n || n.id === selfId || !CALLABLE.has(n.kind) || cands.has(n.id)) return; |
| 2267 | const nameNorm = norm(n.name || ''); |
| 2268 | if (nameNorm.length < 3) return; |
| 2269 | if (!nameNorm.includes(keyNorm) && !keyNorm.includes(nameNorm)) return; |
| 2270 | cands.set(n.id, n); |
| 2271 | }; |
| 2272 | const cap = key.charAt(0).toUpperCase() + key.slice(1); |
| 2273 | const probes = keyIsType |
| 2274 | ? [`${key}Handler`, key] |