Bump typedoc from 0.20.29 to 0.20.30 (#256)
[poolifier.git] / src / pools / pool-internal.ts
index ddee27eac0ed21bf43ca4f61b8378ee3a3146b6a..911e761df157a07f54ac1300328c82548cc6d9d6 100644 (file)
@@ -1,5 +1,4 @@
 import EventEmitter from 'events'
-import type { MessageValue } from '../utility-types'
 import type { IWorker } from './abstract-pool'
 import type { IPool } from './pool'
 
@@ -38,44 +37,19 @@ export interface IPoolInternal<
    *
    * Events that can currently be listened to:
    *
-   * - `'FullPool'`
+   * - `'busy'`
    */
   readonly emitter: PoolEmitter
 
-  /**
-   * Maximum number of workers that can be created by this pool.
-   */
-  readonly max?: number
-
   /**
    * Whether the pool is dynamic or not.
    *
    * If it is dynamic, it provides the `max` property.
    */
-  isDynamic(): boolean
-
-  /**
-   * Creates a new worker for this pool and sets it up completely.
-   *
-   * @returns New, completely set up worker.
-   */
-  createAndSetupWorker(): Worker
-
-  /**
-   * Shut down given worker.
-   *
-   * @param worker A worker within `workers`.
-   */
-  destroyWorker(worker: Worker): void | Promise<void>
+  readonly dynamic: boolean
 
   /**
-   * Register a listener callback on a given worker.
-   *
-   * @param worker A worker.
-   * @param listener A message listener callback.
+   * Maximum number of workers that can be created by this pool.
    */
-  registerWorkerMessageListener<Message extends Data | Response>(
-    worker: Worker,
-    listener: (message: MessageValue<Message>) => void
-  ): void
+  readonly max?: number
 }