Merge branch 'master' of github.com:poolifier/poolifier
[poolifier.git] / src / utility-types.ts
index d74773190f4c1e477e86d4a4f4c984d7d61d9f40..fa1c0ffefdf27e6996789cc444f44d81de9076fc 100644 (file)
@@ -8,12 +8,16 @@ import type { IWorker, Task } from './pools/worker'
  * @typeParam Data - Type of data sent to the worker triggering an error. This can only be structured-cloneable data.
  */
 export interface TaskError<Data = unknown> {
+  /**
+   * Task name triggering the error.
+   */
+  readonly name: string
   /**
    * Error message.
    */
   readonly message: string
   /**
-   * Data passed to the worker triggering the error.
+   * Data triggering the error.
    */
   readonly data?: Data
 }