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

Function dartLibrarySees

src/resolution/dart-libraries.ts:747–754  ·  view source on GitHub ↗
(fromFile: string, declFile: string, name: string, context: ResolutionContext)

Source from the content-addressed store, hash-verified

745 * library of `fromFile` cannot be established.
746 */
747export function dartLibrarySees(fromFile: string, declFile: string, name: string, context: ResolutionContext): boolean {
748 if (fromFile === declFile) return true;
749 const memo = memoFor(context);
750 const scope = scopeOf(fromFile, context, memo);
751 if (!scope || scope.own.has(declFile)) return true;
752 if (name.startsWith('_')) return false;
753 return (importedFilters(scope, '', declFile, context, memo) ?? []).some((f) => lets(f, name));
754}
755
756/**
757 * Whether `prefix.name` in `fromFile` can mean `name` declared at the top

Callers

nothing calls this directly

Calls 5

importedFiltersFunction · 0.85
letsFunction · 0.85
hasMethod · 0.80
memoForFunction · 0.70
scopeOfFunction · 0.70

Tested by

no test coverage detected