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

Function ownUnitDeclaration

src/resolution/pascal-scope.ts:2396–2402  ·  view source on GitHub ↗

The unit's own declaration of a name, seen from one of its files (see ownUnitFiles).

(fromFile: string, lower: string, context: ResolutionContext)

Source from the content-addressed store, hash-verified

2394
2395/** The unit's own declaration of a name, seen from one of its files (see ownUnitFiles). */
2396function ownUnitDeclaration(fromFile: string, lower: string, context: ResolutionContext): Node | undefined {
2397 for (const file of ownUnitFiles(fromFile, context)) {
2398 const decl = unitDeclaration(file, lower, context);
2399 if (decl) return decl;
2400 }
2401 return undefined;
2402}
2403
2404/**
2405 * The files whose declarations are a file's unit's own, the file first: the

Callers 3

declarationInScopeFunction · 0.85
headOfFunction · 0.85
typeOfLinksFunction · 0.85

Calls 2

ownUnitFilesFunction · 0.85
unitDeclarationFunction · 0.85

Tested by

no test coverage detected