- const res: boolean[] = []
- for (const workerChoiceStrategy of this.workerChoiceStrategies.values()) {
- res.push(workerChoiceStrategy.update(workerNodeKey))
- }
- return res.every(r => r)
+ return Array.from(
+ this.workerChoiceStrategies,
+ ([_, workerChoiceStrategy]) => workerChoiceStrategy.update(workerNodeKey)
+ ).every(r => r)