MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / normalizeInferredTypeName

Function normalizeInferredTypeName

src/resolution/name-matcher.ts:1120–1126  ·  view source on GitHub ↗
(raw: string)

Source from the content-addressed store, hash-verified

1118 * reject obvious non-types.
1119 */
1120export 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)

Callers 3

matchLineFunction · 0.85

Calls 1

hasMethod · 0.80

Tested by

no test coverage detected