+ constructor (
+ worker: Worker,
+ workerType: WorkerType,
+ tasksQueueBackPressureSize: number
+ ) {
+ if (worker == null) {
+ throw new TypeError('Cannot construct a worker node without a worker')
+ }
+ if (workerType == null) {
+ throw new TypeError(
+ 'Cannot construct a worker node without a worker type'
+ )
+ }
+ if (tasksQueueBackPressureSize == null) {
+ throw new TypeError(
+ 'Cannot construct a worker node without a tasks queue back pressure size'
+ )
+ }
+ if (!Number.isSafeInteger(tasksQueueBackPressureSize)) {
+ throw new TypeError(
+ 'Cannot construct a worker node with a tasks queue back pressure size that is not an integer'
+ )
+ }