From 34d68e4dfd2eeebabf3c9a25f4f410c713144ea6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 8 Jun 2023 00:01:51 +0200 Subject: [PATCH] refactor: cleanup message type namespace MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/utility-types.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/utility-types.ts b/src/utility-types.ts index 3917ad20..10b8eda1 100644 --- a/src/utility-types.ts +++ b/src/utility-types.ts @@ -56,15 +56,16 @@ export interface WorkerStatistics { /** * Message object that is passed between main worker and worker. * + * @typeParam MessageData - Type of data sent to and/or from the worker. This can only be serializable data. * @typeParam Data - Type of data sent to the worker. This can only be serializable data. * @typeParam MainWorker - Type of main worker. * @internal */ export interface MessageValue< + MessageData = unknown, Data = unknown, - ErrorData = unknown, MainWorker extends ClusterWorker | MessagePort = ClusterWorker | MessagePort -> extends Task { +> extends Task { /** * Kill code. */ @@ -72,7 +73,7 @@ export interface MessageValue< /** * Task error. */ - readonly taskError?: TaskError + readonly taskError?: TaskError /** * Task performance. */ -- 2.34.1