| 2305 | if (keyNorm.length < 3) return ''; |
| 2306 | const cands = new Map<string, Node>(); |
| 2307 | const consider = (n: Node | undefined | null) => { |
| 2308 | if (!n || n.id === selfId || !CALLABLE.has(n.kind) || cands.has(n.id)) return; |
| 2309 | const nameNorm = norm(n.name || ''); |
| 2310 | if (nameNorm.length < 3) return; |
| 2311 | if (!nameNorm.includes(keyNorm) && !keyNorm.includes(nameNorm)) return; |
| 2312 | cands.set(n.id, n); |
| 2313 | }; |
| 2314 | const cap = key.charAt(0).toUpperCase() + key.slice(1); |
| 2315 | const probes = keyIsType |
| 2316 | ? [`${key}Handler`, key] |