(relation: WireRelation)
| 86 | |
| 87 | /** The distinct branch conditions across a relation's edges, at most three. */ |
| 88 | export function relationWhens(relation: WireRelation): string[] { |
| 89 | const out: string[] = []; |
| 90 | for (const edge of relation.edges) { |
| 91 | if (edge.when && !out.includes(edge.when)) out.push(edge.when); |
| 92 | if (out.length === 3) break; |
| 93 | } |
| 94 | return out; |
| 95 | } |
| 96 | |
| 97 | /** The synthesizer that produced this relation's edge, when one did. */ |
| 98 | export function synthesizedBy(relation: WireRelation): string | null { |
no test coverage detected