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

Function getInferScanStates

src/resolution/name-matcher.ts:1174–1181  ·  view source on GitHub ↗
(context: ResolutionContext)

Source from the content-addressed store, hash-verified

1172const INFER_SCAN_STATES = new WeakMap<ResolutionContext, Map<string, InferScanState>>();
1173
1174function getInferScanStates(context: ResolutionContext): Map<string, InferScanState> {
1175 let m = INFER_SCAN_STATES.get(context);
1176 if (!m) {
1177 m = new Map();
1178 INFER_SCAN_STATES.set(context, m);
1179 }
1180 return m;
1181}
1182
1183/** Drop the per-context scan states (see ReferenceResolver.clearCaches). */
1184export function clearNameMatcherMemos(context: ResolutionContext): void {

Callers 1

inferLocalReceiverTypeFunction · 0.85

Calls 2

getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected