docs: add type definition documentation
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 7 Jun 2023 22:16:54 +0000 (00:16 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 7 Jun 2023 22:16:54 +0000 (00:16 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
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.