docs: refine code documentation
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 15 Apr 2023 12:46:13 +0000 (14:46 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 15 Apr 2023 12:46:13 +0000 (14:46 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/pool.ts
src/pools/selection-strategies/selection-strategies-types.ts
src/pools/worker.ts

index 907bfcb5982f8e1916877e516c3e791eddcc5be0..4115ab5b9a5c7d5d99e1b869ff5340fab42d9c5b 100644 (file)
@@ -83,6 +83,8 @@ export interface PoolOptions<Worker extends IWorker> {
   exitHandler?: ExitHandler<Worker>
   /**
    * The worker choice strategy to use in this pool.
+   *
+   * @defaultValue 'ROUND_ROBIN'
    */
   workerChoiceStrategy?: WorkerChoiceStrategy
   /**
index f9a504351a4bbbe9d33bddc145c457a7ce27ef78..fa0d0f641a4b8618efa7346a3ba4029a93bc533b 100644 (file)
@@ -35,6 +35,8 @@ export type WorkerChoiceStrategy = keyof typeof WorkerChoiceStrategies
 export interface WorkerChoiceStrategyOptions {
   /**
    * Use tasks median run time instead of average run time.
+   *
+   * @defaultValue false
    */
   medRunTime?: boolean
 }
index 82aed5526c976a1d05691dd04d922d4f33bcd5ee..8d62712b5d598ada970ae337ddee7eb2406f9193 100644 (file)
@@ -37,7 +37,7 @@ export type ExitHandler<Worker extends IWorker> = (
  */
 export interface Task<Data = unknown> {
   /**
-   * Input data that will be passed to the worker.
+   * Task input data that will be passed to the worker.
    */
   readonly data?: Data
   /**