From 4c0ada52750183cd0fb1d5e26b6be7d80d042051 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 6 May 2023 22:06:40 +0200 Subject: [PATCH] fix: silence sonar code smell MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- README.md | 2 +- src/utility-types.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cd882833..07bcdb10 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ Node versions >= 16.x are supported. Properties: - `medRunTime` (optional) - Use the tasks median run time instead of the tasks average run time in worker choice strategies. - - `weights` (optional) - The weights to use in the weighted round robin worker choice strategy: `{ workerNodeKey: weight, ...}` + - `weights` (optional) - The worker weights to use in the weighted round robin worker choice strategy: `{ 0: 200, 1: 300, ..., n: 100 }` Default: `{ medRunTime: false }` diff --git a/src/utility-types.ts b/src/utility-types.ts index 331085fe..08861ebd 100644 --- a/src/utility-types.ts +++ b/src/utility-types.ts @@ -19,7 +19,7 @@ export type Draft = { -readonly [P in keyof T]?: T[P] } */ export interface MessageValue< Data = unknown, - MainWorker extends ClusterWorker | MessagePort | unknown = unknown + MainWorker extends ClusterWorker | MessagePort = ClusterWorker | MessagePort > extends Task { /** * Kill code. -- 2.34.1