From: Jérôme Benoit Date: Sat, 26 Aug 2023 23:40:00 +0000 (+0200) Subject: refactor: refine argument type X-Git-Tag: v2.6.37~40 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=76d91ea024f25ed0f2ba8d2174bcc3c43fefb02b;p=poolifier.git refactor: refine argument type Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 2f5c6189..2a28893d 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -5,8 +5,7 @@ import { type TransferListItem } from 'node:worker_threads' import type { MessageValue, PromiseResponseWrapper, - Task, - Writable + Task } from '../utility-types' import { DEFAULT_TASK_NAME, @@ -292,7 +291,7 @@ export abstract class AbstractPool< } private checkValidTasksQueueOptions ( - tasksQueueOptions: Writable + tasksQueueOptions: TasksQueueOptions ): void { if (tasksQueueOptions != null && !isPlainObject(tasksQueueOptions)) { throw new TypeError('Invalid tasks queue options: must be a plain object')