diff options
Diffstat (limited to 'protocol.d.ts')
-rw-r--r-- | protocol.d.ts | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/protocol.d.ts b/protocol.d.ts index 16f45d8..79949b8 100644 --- a/protocol.d.ts +++ b/protocol.d.ts @@ -45,15 +45,11 @@ interface Task { */ // should only have one property -interface Condition { - from: Condition - - or: Condition[] - and: Condition[] - - equal?: { prop: Thing, value: number, mod?: number } - range?: { prop: Thing, min: number, max: number, mod?: number } -} +export type Condition = { from?: Condition } + | { or?: Condition[] } + | { and?: Condition[] } + | { equal?: { prop: Thing, value: number, mod?: number } } + | { range?: { prop: Thing, min: number, max: number, mod?: number } } type Thing = "year" | "monthofyear" |