(a, b)
| 206 | * @returns {boolean} true, if a is always a parent of b |
| 207 | */ |
| 208 | const isAvailableChunk = (a, b) => { |
| 209 | const queue = new Set(b.groupsIterable); |
| 210 | for (const chunkGroup of queue) { |
| 211 | if (a.isInGroup(chunkGroup)) continue; |
| 212 | if (chunkGroup.isInitial()) return false; |
| 213 | for (const parent of chunkGroup.parentsIterable) { |
| 214 | queue.add(parent); |
| 215 | } |
| 216 | } |
| 217 | return true; |
| 218 | }; |
| 219 | |
| 220 | /** @typedef {SortableSet<Chunk>} SortableChunks */ |
| 221 | /** @typedef {Set<Chunk>} EntryInChunks */ |
no test coverage detected