(from: StepRecord, chain: readonly Node[])
| 1068 | // function reads in the code's order and carries none of this. |
| 1069 | const regions = first.kind === 'screen' && !first.screen?.endpoint; |
| 1070 | const regionOf = (from: StepRecord, chain: readonly Node[]): WireStep['region'] => { |
| 1071 | if (!regions) return undefined; |
| 1072 | if (!from.anchor) return from.region; |
| 1073 | const head = chain[0]; |
| 1074 | if (head) return { id: head.id, label: head.name }; |
| 1075 | return { id: from.root?.id ?? from.id, label: from.root?.name ?? from.label }; |
| 1076 | }; |
| 1077 | const queue: StepRecord[] = [first]; |
| 1078 | /** Steps whose exploration has been queued — each is explored once, from the first row it appears on. */ |
| 1079 | const explored = new Set<string>([first.id]); |
no outgoing calls
no test coverage detected