From: Jérôme Benoit Date: Tue, 11 Apr 2023 19:55:30 +0000 (+0200) Subject: docs: add missing exports X-Git-Tag: v2.4.7~12 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=0274ce2ddfe129ce40ff5b322f52777449902386;p=poolifier.git docs: add missing exports Signed-off-by: Jérôme Benoit --- diff --git a/src/index.ts b/src/index.ts index 7a246505..ad0af487 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,10 +2,17 @@ export { DynamicClusterPool } from './pools/cluster/dynamic' export { FixedClusterPool } from './pools/cluster/fixed' export type { ClusterPoolOptions } from './pools/cluster/fixed' export { PoolEvents } from './pools/pool' -export type { IPool, PoolEmitter, PoolOptions, PoolEvent } from './pools/pool' +export type { + IPool, + PoolEmitter, + PoolOptions, + PoolEvent, + TasksQueueOptions +} from './pools/pool' export type { ErrorHandler, ExitHandler, + IWorker, MessageHandler, OnlineHandler } from './pools/worker' diff --git a/src/pools/pool.ts b/src/pools/pool.ts index 2cdf9b74..fe03741a 100644 --- a/src/pools/pool.ts +++ b/src/pools/pool.ts @@ -86,7 +86,6 @@ export interface PoolOptions { * Pool worker tasks queue options. * * @experimental - * @defaultValue \{ concurrency: 1 \} */ tasksQueueOptions?: TasksQueueOptions } diff --git a/src/pools/worker.ts b/src/pools/worker.ts index 1e23ee87..1f8efbc6 100644 --- a/src/pools/worker.ts +++ b/src/pools/worker.ts @@ -33,7 +33,13 @@ export type ExitHandler = ( * Worker task interface. */ export interface Task { + /** + * Worker task data. + */ data: Data + /** + * Task UUID. + */ id: string }