From 8f52842f4b4fa9059f25fc4a90e8bbe8db2f5e63 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 15 Apr 2023 14:22:41 +0200 Subject: [PATCH] docs: align methods signature namespace MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/pools/abstract-pool.ts | 14 +++++++++----- src/pools/pool.ts | 5 ++++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 9ba4fbf9..3bc00a6f 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -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 } diff --git a/src/pools/pool.ts b/src/pools/pool.ts index a0663ba5..396c59ad 100644 --- a/src/pools/pool.ts +++ b/src/pools/pool.ts @@ -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. * -- 2.34.1