From: Jérôme Benoit Date: Wed, 7 Jun 2023 22:01:51 +0000 (+0200) Subject: refactor: cleanup message type namespace X-Git-Tag: v2.6.0~19 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=34d68e4dfd2eeebabf3c9a25f4f410c713144ea6;p=poolifier.git refactor: cleanup message type namespace Signed-off-by: Jérôme Benoit --- 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. */