docs: enhance documentation
[poolifier.git] / src / utility-types.ts
index 458b31a055ef7d4a92e86bd9f9fbd1be46512d80..685e5c4c606755bf801dd6c13d582d3657f8fe8e 100644 (file)
@@ -10,6 +10,9 @@ export type Draft<T> = { -readonly [P in keyof T]?: T[P] }
 
 /**
  * Message object that is passed between worker and main worker.
+ *
+ * @typeParam Data - Type of data sent to the worker. This can only be serializable data.
+ * @typeParam MainWorker - Type of main worker.
  */
 export interface MessageValue<
   Data = unknown,
@@ -39,6 +42,7 @@ export interface MessageValue<
    * Reference to main worker.
    *
    * Only for internal use.
+   * @internal
    */
   readonly parent?: MainWorker
 }
@@ -48,6 +52,7 @@ export interface MessageValue<
  *
  * @typeParam Worker - Type of worker.
  * @typeParam Response - Type of execution response. This can only be serializable data.
+ * @internal
  */
 export interface PromiseResponseWrapper<
   Worker extends IWorker,
@@ -62,7 +67,7 @@ export interface PromiseResponseWrapper<
    */
   readonly reject: (reason?: string) => void
   /**
-   * The worker handling the promise.
+   * The worker handling the execution.
    */
   readonly worker: Worker
 }