) {
this.opts = {
...getDefaultInternalWorkerChoiceStrategyOptions(
- pool.info.maxSize +
- Object.keys((this.opts?.weights as Record<number, number>) ?? {})
- .length
+ pool.info.maxSize + Object.keys(this.opts?.weights ?? {}).length
),
...this.opts
}
): void {
this.opts = {
...getDefaultInternalWorkerChoiceStrategyOptions(
- pool.info.maxSize +
- Object.keys((opts?.weights as Record<number, number>) ?? {}).length
+ pool.info.maxSize + Object.keys(opts?.weights ?? {}).length
),
...opts
}