diff options
Diffstat (limited to 'protocol.d.ts')
-rw-r--r-- | protocol.d.ts | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/protocol.d.ts b/protocol.d.ts index 36bf3e1..0657cdf 100644 --- a/protocol.d.ts +++ b/protocol.d.ts @@ -36,32 +36,34 @@ interface Task { deadline?: Condition, } -/* - { and: [ - { or: [{ dayofweak: 0 }, { dayofweak: 1 }] }, - { weekofmonth: 0 } - { hour: [11, 13] } - ]} +/* + 11:00 - 12:00 every first monday of the month + + and: [ + range: {prop: "hour", min: 11, max: 12}, + equal: {prop: "dayofweek", value: 0}, + equal: {prop: "weekofmonth", value: 0}, + ] */ // should only have one property interface Condition { from: Condition - to: Condition or: Condition[] and: Condition[] - year?: [number, number], - monthofyear?: [number, number], - weekofmonth?: [number, number], - dayofyear?: [number, number], - dayofmonth?: [number, number], - dayofweek?: [number, number], - - hour?: [number, number], - minute?: [number, number], - second?: [number, number], - - unix?: [number, number], + equal?: { prop: Thing, value: number, mod?: number } + range?: { prop: Thing, min: number, max: number, mod?: number } } + +type Thing = "year" + | "monthofyear" + | "weekofmonth" + | "dayofyear" + | "dayofmonth" + | "dayofweek" + | "hour" + | "minute" + | "second" + | "unix"
\ No newline at end of file |