node-cron-expression
Version:
Declarative functional crontab expression builder
58 lines (57 loc) • 1.44 kB
TypeScript
/**
* Create an expression with default values. Every value defaults to `*`.
*
* ```
* const expression = new Expression({hour: '1'}); // * 1 * * *
* ```
*/
export declare class Expression {
private minute;
private hour;
private dayOfTheMonth;
private month;
private dayOfTheWeek;
constructor(params?: {
minute?: string;
hour?: string;
dayOfTheMonth?: string;
month?: string;
dayOfTheWeek?: string;
});
setMinute(minute: string): void;
setHour(hour: string): void;
setDayOfTheMonth(dayOfTheMonth: string): void;
setMonth(month: string): void;
setDayOfTheWeek(dayOfTheWeek: string): void;
getMinute(): string;
getHour(): string;
getDayOfTheMonth(): string;
getMonth(): string;
getDayOfTheWeek(): string;
toString(): string;
}
/**
* Alias of Expression to infer the return type
*/
export declare class MinuteExpression extends Expression {
}
/**
* Alias of Expression to infer the return type
*/
export declare class HourExpression extends Expression {
}
/**
* Alias of Expression to infer the return type
*/
export declare class DayOfTheMonthExpression extends Expression {
}
/**
* Alias of Expression to infer the return type
*/
export declare class MonthExpression extends Expression {
}
/**
* Alias of Expression to infer the return type
*/
export declare class DayOfTheWeekExpression extends Expression {
}