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

Function countImplementers

src/graph/type-hierarchy.ts:475–482  ·  view source on GitHub ↗
(cg: CodeGraph, typeId: string)

Source from the content-addressed store, hash-verified

473 * exists to prevent.
474 */
475export function countImplementers(cg: CodeGraph, typeId: string): number {
476 try {
477 const edges = cg.getIncomingEdgesTo([typeId], [...HIERARCHY_EDGE_KINDS]);
478 return new Set(edges.map((e) => e.source)).size;
479 } catch {
480 return 0;
481 }
482}

Callers 2

Calls 2

mapMethod · 0.80
getIncomingEdgesToMethod · 0.45

Tested by

no test coverage detected