+/**
+ * Task error.
+ *
+ * @typeParam Data - Type of data sent to the worker. This can only be serializable data.
+ */
+export interface TaskError<Data = unknown> {
+ /**
+ * Error message.
+ */
+ message: string
+ /**
+ * Data passed to the worker triggering the error.
+ */
+ data?: Data
+}
+