* Checks whether this chunk has async chunks. * @returns {boolean} true, if the chunk references async chunks
()
| 759 | * @returns {boolean} true, if the chunk references async chunks |
| 760 | */ |
| 761 | hasAsyncChunks() { |
| 762 | /** @type {Queue} */ |
| 763 | const queue = new Set(); |
| 764 | |
| 765 | const initialChunks = intersect( |
| 766 | Array.from(this.groupsIterable, (g) => new Set(g.chunks)) |
| 767 | ); |
| 768 | |
| 769 | for (const chunkGroup of this.groupsIterable) { |
| 770 | for (const child of chunkGroup.childrenIterable) { |
| 771 | queue.add(child); |
| 772 | } |
| 773 | } |
| 774 | |
| 775 | for (const chunkGroup of queue) { |
| 776 | for (const chunk of chunkGroup.chunks) { |
| 777 | if (!initialChunks.has(chunk)) { |
| 778 | return true; |
| 779 | } |
| 780 | } |
| 781 | for (const child of chunkGroup.childrenIterable) { |
| 782 | queue.add(child); |
| 783 | } |
| 784 | } |
| 785 | |
| 786 | return false; |
| 787 | } |
| 788 | |
| 789 | /** |
| 790 | * Gets child ids by orders. |