export declare type tickCallback = (val: any, indx?: number) => any; export interface JobOptions { /** * Job identifier */ id: string; /** * Cron-string */ frequency: string; /** * Number of `tick`s */ ticksCount: number; /** * Time in seconds */ ticksDelay: number; /** * When job should be stopped */ endTime?: number; /** * Start job */ firstTick?: tickCallback; /** * Job-handler for ticks before `firstTick` and `lastTick` */ tick?: tickCallback; /** * Finish job */ lastTick?: tickCallback; } /** * Execution: * * ```text * firstTick() -> ...tick() -> lastTick() * ``` * * `tick` is called `ticksCount` times */ export default class Job { static createJob(options: JobOptions): Job; private internalId; private firstTick; private tick; private lastTick; private internalJob; private constructor(); get id(): string; start(): void; stop(): void; destroy(): void; }