Optional
onCancel?: () => voidWhat should happen when the thread job was cancelled.
Optional
onComplete?: () => voidWhat should happen when the thread job completes.
Optional
onError?: (error: Error) => voidWhat should happen when an error occurs inside the thread job.
Optional
onMessage?: (message: unknown) => voidWhat should happen when a message is received from the thread job.
The function values of the thread job data. This is separated because this cannot be persisted in a database.