What a function's or method's `kind` edges reach, as `qualifiedName @confidence`.
(cg: CodeGraph, qualifiedName: string, kind: 'calls' | 'instantiates')
| 33 | |
| 34 | /** What a function's or method's `kind` edges reach, as `qualifiedName @confidence`. */ |
| 35 | function targets(cg: CodeGraph, qualifiedName: string, kind: 'calls' | 'instantiates'): string[] { |
| 36 | const from = [...cg.getNodesByKind('method'), ...cg.getNodesByKind('function')].find((n) => n.qualifiedName === qualifiedName)!; |
| 37 | return cg.getOutgoingEdgesFrom([from.id], [kind]) |
| 38 | .map((e) => `${cg.getNode(e.target)?.qualifiedName} @${(e.metadata as { confidence?: number } | undefined)?.confidence}`) |
| 39 | .sort(); |
| 40 | } |
| 41 | |
| 42 | const NS = 'google::protobuf::conformance'; |
| 43 | const SUITE = lines( |
no test coverage detected