+ constructor (worker: Worker, workerType: WorkerType, poolMaxSize: 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 (poolMaxSize == null) {
+ throw new TypeError(
+ 'Cannot construct a worker node without a pool maximum size'
+ )
+ }
+ if (!Number.isSafeInteger(poolMaxSize)) {
+ throw new TypeError(
+ 'Cannot construct a worker node with a pool maximum size that is not an integer'
+ )
+ }