Skip to content

Commit

Permalink
return type
Browse files Browse the repository at this point in the history
  • Loading branch information
kbariotis committed Jan 4, 2022
1 parent be783aa commit 8180111
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/lib/expression.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
/**
* Create an expression with default values. Every value defaults to `*`.
*
* ```
* const expression = new Expression({hour: '1'}); // * 1 * * *
* ```
*/
export class Expression {
private minute: string;
private hour: string;
Expand Down Expand Up @@ -56,8 +63,27 @@ export class Expression {
}
}

/**
* Alias of Expression to infer the return type
*/
export class MinuteExpression extends Expression {}

/**
* Alias of Expression to infer the return type
*/
export class HourExpression extends Expression {}

/**
* Alias of Expression to infer the return type
*/
export class DayOfTheMonthExpression extends Expression {}

/**
* Alias of Expression to infer the return type
*/
export class MonthExpression extends Expression {}

/**
* Alias of Expression to infer the return type
*/
export class DayOfTheWeekExpression extends Expression {}

0 comments on commit 8180111

Please sign in to comment.