From 187601ffac6659dc97fc2797c8e9f6b0d49a4f5f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 3 Sep 2023 11:21:06 +0200 Subject: [PATCH] refactor: code cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/utils.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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) { -- 2.34.1