docs: align methods signature namespace
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 15 Apr 2023 12:22:41 +0000 (14:22 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 15 Apr 2023 12:22:41 +0000 (14:22 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/abstract-pool.ts
src/pools/pool.ts

index 9ba4fbf9c6dcc6d4d152891a3c19ad0fa01715a4..3bc00a6fffd36c987dd015fdeecd6b62f1e6a662 100644 (file)
@@ -251,21 +251,25 @@ export abstract class AbstractPool<
   }
 
   /** @inheritDoc */
-  public enableTasksQueue (enable: boolean, opts?: TasksQueueOptions): void {
+  public enableTasksQueue (
+    enable: boolean,
+    tasksQueueOptions?: TasksQueueOptions
+  ): void {
     if (this.opts.enableTasksQueue === true && !enable) {
       for (const [workerNodeKey] of this.workerNodes.entries()) {
         this.flushTasksQueue(workerNodeKey)
       }
     }
     this.opts.enableTasksQueue = enable
-    this.setTasksQueueOptions(opts as TasksQueueOptions)
+    this.setTasksQueueOptions(tasksQueueOptions as TasksQueueOptions)
   }
 
   /** @inheritDoc */
-  public setTasksQueueOptions (opts: TasksQueueOptions): void {
+  public setTasksQueueOptions (tasksQueueOptions: TasksQueueOptions): void {
     if (this.opts.enableTasksQueue === true) {
-      this.checkValidTasksQueueOptions(opts)
-      this.opts.tasksQueueOptions = this.buildTasksQueueOptions(opts)
+      this.checkValidTasksQueueOptions(tasksQueueOptions)
+      this.opts.tasksQueueOptions =
+        this.buildTasksQueueOptions(tasksQueueOptions)
     } else {
       delete this.opts.tasksQueueOptions
     }
index a0663ba523a765878a4566aafe7a667b9ab220f2..396c59ad987ea5c9e8294190587917d8036990b5 100644 (file)
@@ -183,7 +183,10 @@ export interface IPool<
    * @param enable - Whether to enable or disable the worker tasks queue.
    * @param tasksQueueOptions - The worker tasks queue options.
    */
-  enableTasksQueue: (enable: boolean, opts?: TasksQueueOptions) => void
+  enableTasksQueue: (
+    enable: boolean,
+    tasksQueueOptions?: TasksQueueOptions
+  ) => void
   /**
    * Sets the worker tasks queue options in this pool.
    *