(raw: string)
| 1118 | * reject obvious non-types. |
| 1119 | */ |
| 1120 | export function normalizeInferredTypeName(raw: string): string | null { |
| 1121 | const cleaned = raw.replace(/<[^>]*>/g, '').replace(/[&*]/g, '').trim(); |
| 1122 | const seg = cleaned.split(/[.:]+/).filter(Boolean).pop(); |
| 1123 | if (!seg) return null; |
| 1124 | if (NON_TYPE_RECEIVER_TOKENS.has(seg)) return null; |
| 1125 | return seg; |
| 1126 | } |
| 1127 | |
| 1128 | /** |
| 1129 | * Per-language patterns that recover a local variable's (or typed parameter's) |
no test coverage detected