UNPKG

890 BTypeScriptView Raw
1// Type definitions for cron 1.2
2// Project: https://www.npmjs.com/package/cron
3// Definitions by: Hiroki Horiuchi <https://github.com/horiuchi>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6
7
8interface CronJobStatic {
9 new (cronTime: string | Date, onTick: () => void, onComplete?: () => void, start?: boolean, timeZone?: string, context?: any, runOnInit?: boolean): CronJob;
10 new (options: {
11 cronTime: string | Date; onTick: () => void; onComplete?: () => void; start?: boolean; timeZone?: string; context?: any; runOnInit?: boolean
12 }): CronJob;
13}
14interface CronJob {
15 start(): void;
16 stop(): void;
17 running: boolean | undefined;
18}
19export declare var CronJob: CronJobStatic;
20
21interface CronTimeStatic {
22 new (time: string | Date): CronTime;
23}
24interface CronTime { }
25export declare var CronTime: CronTimeStatic;