Data = unknown,
Response = unknown
> extends AsyncResource {
+ /**
+ * Options for the worker.
+ */
+ public readonly opts: WorkerOptions
/**
* Timestamp of the last task processed by this worker.
*/
isMain: boolean,
fn: (data: Data) => Response,
protected mainWorker: MainWorker | undefined | null,
- public readonly opts: WorkerOptions = {
+ opts: WorkerOptions = {
/**
* The kill behavior option on this Worker or its default value.
*/
}
) {
super(type)
+ this.opts = opts
this.checkFunctionInput(fn)
this.checkWorkerOptions(this.opts)
this.lastTaskTimestamp = Date.now()