refactor(priority-queue): cleanup intermediate variables namespace
[poolifier.git] / src / utility-types.ts
index 82f79230accb88160ae612e9d5cc5ba7da57d157..b29f801298b065f542f3ee981eb7cf3103456e42 100644 (file)
@@ -7,7 +7,6 @@ import type { KillBehavior } from './worker/worker-options.js'
 
 /**
  * Worker error.
- *
  * @typeParam Data - Type of data sent to the worker triggering an error. This can only be structured-cloneable data.
  */
 export interface WorkerError<Data = unknown> {
@@ -27,7 +26,6 @@ export interface WorkerError<Data = unknown> {
 
 /**
  * Task performance.
- *
  * @internal
  */
 export interface TaskPerformance {
@@ -51,7 +49,6 @@ export interface TaskPerformance {
 
 /**
  * Worker task performance statistics computation settings.
- *
  * @internal
  */
 export interface WorkerStatistics {
@@ -85,7 +82,6 @@ export interface TaskFunctionProperties {
 
 /**
  * Message object that is passed as a task between main worker and worker.
- *
  * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data.
  * @internal
  */
@@ -100,7 +96,6 @@ export interface Task<Data = unknown> {
   readonly data?: Data
   /**
    * Task priority. Lower values have higher priority.
-   *
    * @defaultValue 0
    */
   readonly priority?: number
@@ -124,7 +119,6 @@ export interface Task<Data = unknown> {
 
 /**
  * Message object that is passed between main worker and worker.
- *
  * @typeParam Data - Type of data sent to the worker or execution response. This can only be structured-cloneable data.
  * @typeParam ErrorData - Type of data sent to the worker triggering an error. This can only be structured-cloneable data.
  * @internal
@@ -190,7 +184,6 @@ export interface MessageValue<Data = unknown, ErrorData = unknown>
 
 /**
  * An object holding the task execution response promise resolve/reject callbacks.
- *
  * @typeParam Response - Type of execution response. This can only be structured-cloneable data.
  * @internal
  */
@@ -213,4 +206,9 @@ export interface PromiseResponseWrapper<Response = unknown> {
   readonly asyncResource?: AsyncResource
 }
 
+/**
+ * Remove readonly modifier from all properties of T.
+ * @typeParam T - Type to remove readonly modifier.
+ * @internal
+ */
 export type Writable<T> = { -readonly [P in keyof T]: T[P] }