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

Function containerMember

src/resolution/import-resolver.ts:3114–3119  ·  view source on GitHub ↗

An enum's, a class's or an interface's member at `path` (`Kind::Line`), in the container's own file.

(container: Node, path: string[], context: ResolutionContext)

Source from the content-addressed store, hash-verified

3112
3113/** An enum's, a class's or an interface's member at `path` (`Kind::Line`), in the container's own file. */
3114function containerMember(container: Node, path: string[], context: ResolutionContext): Node | undefined {
3115 if (path.length === 0) return undefined;
3116 return context.getNodesByQualifiedName(`${container.qualifiedName}::${path.join('::')}`)
3117 .filter((n) => n.filePath === container.filePath)
3118 .sort(typesFirst)[0];
3119}
3120
3121/** Kinds a declaration at a file's or a namespace's own level has; a class's member is `Class::member`. */
3122const MEMBER_DECLARATION_KINDS: ReadonlySet<Node['kind']> = new Set<Node['kind']>([

Callers 2

importedTypeMemberFunction · 0.85
typeMemberInFunction · 0.85

Calls 2

joinMethod · 0.45

Tested by

no test coverage detected