Type Parameters
- I extends any[] = any[]
- O = unknown
Constructors
constructor
- new TsWorkerJob<I, O>(doFunction, ...args): TsWorkerJob<I, O>
Type Parameters
- I extends any[] = any[]
- O = unknown
Parameters
- doFunction: string | ((...args: I) => Promise<O>)
Rest
...args: I
Properties
doFunction
doFunction: string | ((...args: I) => Promise<O>) = ... Accessors
id
- get id(): number
Returns number
result
- get result(): any
Returns any
- set result(value): void
Returns void
statistics
- get statistics(): {
ended: number;
started: number;
} Returns {
ended: number;
started: number;
}
ended: number
started: number
- set statistics(value): void
Parameters
- value: {
ended: number;
started: number;
}ended: number
started: number
Returns void
Methods
changeStatus
- changeStatus(status): void
Returns void
This class defines a task with given function and parameters.