export abstract class AbstractWorker<
MainWorker,
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- Data = any,
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- Response = any
+ Data = unknown,
+ Response = unknown
> extends AsyncResource {
protected readonly maxInactiveTime: number
protected readonly async: boolean
this.maxInactiveTime = this.opts.maxInactiveTime ?? 1000 * 60
this.async = !!this.opts.async
this.lastTask = Date.now()
- if (!fn) throw new Error('Fn parameter is mandatory')
+ if (!fn) throw new Error('fn parameter is mandatory')
// keep the worker active
if (!isMain) {
this.interval = setInterval(