) {
this.workerNodeVirtualTaskRunTime = 0
}
- const workerWeight = this.opts.weights?.[workerNodeKey] as number
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ const workerWeight = this.opts.weights![workerNodeKey]!
if (
this.isWorkerNodeReady(workerNodeKey) &&
workerWeight >= this.roundWeights[roundIndex] &&
private getRoundWeights (): number[] {
return [
...new Set(
- Object.values(this.opts.weights as Record<number, number>)
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ Object.values(this.opts.weights!)
.slice()
.sort((a, b) => a - b)
)