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

Function normalizeInferredTypeName

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

Source from the content-addressed store, hash-verified

1130 * reject obvious non-types.
1131 */
1132export function normalizeInferredTypeName(raw: string): string | null {
1133 const cleaned = raw.replace(/<[^>]*>/g, '').replace(/[&*]/g, '').trim();
1134 const seg = cleaned.split(/[.:]+/).filter(Boolean).pop();
1135 if (!seg) return null;
1136 if (NON_TYPE_RECEIVER_TOKENS.has(seg)) return null;
1137 return seg;
1138}
1139
1140/**
1141 * 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