An interface's method.
(graph: CodeGraph, iface: Node, name: string)
| 251 | |
| 252 | /** An interface's method. */ |
| 253 | function methodOf(graph: CodeGraph, iface: Node, name: string): Node { |
| 254 | const m = graph |
| 255 | .getOutgoingEdgesFrom([iface.id], ['contains']) |
| 256 | .map((e) => graph.getNode(e.target)) |
| 257 | .find((n) => n?.name === name); |
| 258 | expect(m, `${iface.name}.${name}`).toBeTruthy(); |
| 259 | return m!; |
| 260 | } |
| 261 | |
| 262 | /** Where a call through the method dispatches, as `Target::m` or `Target::m <- promotedInto @registeredAt`. */ |
| 263 | function dispatch(graph: CodeGraph, method: Node): string[] { |
no test coverage detected