docs: enhance error message
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 10 Apr 2023 20:09:35 +0000 (22:09 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 10 Apr 2023 20:09:35 +0000 (22:09 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/abstract-pool.ts
src/pools/pool-internal.ts
src/pools/selection-strategies/selection-strategies-types.ts

index 1fd9a1737f10991489af3b006829dcaf3e7bd580..99f65a24a0ee85f606ab7937653cf0b641472bc8 100644 (file)
@@ -142,7 +142,7 @@ export abstract class AbstractPool<
     if (this.opts.enableTasksQueue) {
       if ((opts.tasksQueueOptions?.concurrency as number) <= 0) {
         throw new Error(
-          `Invalid tasks queue concurrency '${
+          `Invalid worker tasks concurrency '${
             (opts.tasksQueueOptions as TasksQueueOptions).concurrency as number
           }'`
         )
index 8912dd2c18f8a99a6791b006f672442e5be5ecdf..b245e360df704ee1e7fde5ce4e114da060cc70fd 100644 (file)
@@ -7,7 +7,13 @@ import type { IWorker, WorkerNode } from './worker'
  * @enum
  */
 export enum PoolType {
+  /**
+   * Fixed pool type.
+   */
   FIXED = 'fixed',
+  /**
+   * Dynamic pool type.
+   */
   DYNAMIC = 'dynamic'
 }
 
index 23dc5e8c9a4e744ed605beeaaca1b38b4e2d944d..7fbe40f28fa3b5d9cc1b8e976a3f46ec45ed9974 100644 (file)
@@ -43,8 +43,17 @@ export interface WorkerChoiceStrategyOptions {
  * Pool worker tasks usage statistics requirements.
  */
 export interface RequiredStatistics {
+  /**
+   * Require tasks run time.
+   */
   runTime: boolean
+  /**
+   * Require tasks average run time.
+   */
   avgRunTime: boolean
+  /**
+   * Require tasks median run time.
+   */
   medRunTime: boolean
 }