Unless I am mistaken, the progress type is hardcoded to type JobProgress = string | boolean | number | object.
It would be very nice to be able to specify the type. Maybe a 4th parameter to the Worker class?
const worker = new Worker<Input, Output, string, { percent: number; msg: string }>(...);
// TypeScript should correctly infer 'progress' here
worker.on('progress', (job, progress) => {
console.log(progress.msg); // OK
});
Unless I am mistaken, the progress type is hardcoded to
type JobProgress = string | boolean | number | object.It would be very nice to be able to specify the type. Maybe a 4th parameter to the
Workerclass?