(blocks: Record<string, T> | T[])
| 129 | } |
| 130 | |
| 131 | function toEntries<T extends MinimalBlock>(blocks: Record<string, T> | T[]): Array<[string, T]> { |
| 132 | if (Array.isArray(blocks)) { |
| 133 | return blocks.map((block, index) => { |
| 134 | const potentialId = (block as { id?: unknown }).id |
| 135 | const inferredId = typeof potentialId === 'string' ? potentialId : `${index}` |
| 136 | return [inferredId, block] |
| 137 | }) |
| 138 | } |
| 139 | return Object.entries(blocks) |
| 140 | } |
| 141 | |
| 142 | type ResolveStartOptions = { |
| 143 | execution: StartExecutionKind |
no outgoing calls
no test coverage detected