From: Jérôme Benoit Date: Sun, 3 Sep 2023 09:21:06 +0000 (+0200) Subject: refactor: code cleanup X-Git-Tag: v2.6.41~7 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=187601ffac6659dc97fc2797c8e9f6b0d49a4f5f;p=poolifier.git refactor: code cleanup Signed-off-by: Jérôme Benoit --- diff --git a/src/utils.ts b/src/utils.ts index e1d6c118..e864a015 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -74,9 +74,7 @@ export const availableParallelism = (): number => { * @returns The worker type of the given worker. * @internal */ -export const getWorkerType = ( - worker: Worker -): WorkerType | undefined => { +export const getWorkerType = (worker: IWorker): WorkerType | undefined => { if (worker instanceof ThreadWorker) { return WorkerTypes.thread } else if (worker instanceof ClusterWorker) { @@ -91,9 +89,7 @@ export const getWorkerType = ( * @returns The worker id of the given worker. * @internal */ -export const getWorkerId = ( - worker: Worker -): number | undefined => { +export const getWorkerId = (worker: IWorker): number | undefined => { if (worker instanceof ThreadWorker) { return worker.threadId } else if (worker instanceof ClusterWorker) {