docs: add type definition documentation
[poolifier.git] / src / utility-types.ts
index 10b8eda1e1470991f23bd9ccbffb99b46fbc90c2..57ff000330e29cc7dffb3541a65438c3edf65b80 100644 (file)
@@ -11,6 +11,11 @@ import type { IWorker, Task } from './pools/worker'
  */
 export type Draft<T> = { -readonly [P in keyof T]?: T[P] }
 
+/**
+ * Task error.
+ *
+ * @typeParam Data - Type of data sent to the worker. This can only be serializable data.
+ */
 export interface TaskError<Data = unknown> {
   /**
    * Error message.