refactor: cleanup exports
[poolifier.git] / src / pools / cluster / dynamic.ts
index b93d7e87c4290a21b8a9b8f7c2845647d05592da..32aad22a738c8541a4147ebbad7a3048ff51f8af 100644 (file)
@@ -1,5 +1,7 @@
-import { type PoolType, PoolTypes } from '../pool'
-import { type ClusterPoolOptions, FixedClusterPool } from './fixed'
+import { type Worker } from 'node:cluster'
+import { type PoolOptions, type PoolType, PoolTypes } from '../pool'
+import { checkDynamicPoolSize } from '../utils'
+import { FixedClusterPool } from './fixed'
 
 /**
  * A cluster pool with a dynamic number of workers, but a guaranteed minimum number of workers.
@@ -28,10 +30,10 @@ export class DynamicClusterPool<
     min: number,
     protected readonly max: number,
     filePath: string,
-    opts: ClusterPoolOptions = {}
+    opts: PoolOptions<Worker> = {}
   ) {
     super(min, filePath, opts)
-    this.checkDynamicPoolSize(this.numberOfWorkers, this.max)
+    checkDynamicPoolSize(this.numberOfWorkers, this.max)
   }
 
   /** @inheritDoc */