From a392a04c83b4e0a8050066280f7efc74d182bcab Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 10 Jun 2022 10:00:06 +0200 Subject: blub --- protocol.d.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'protocol.d.ts') 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" -- cgit v1.2.3-70-g09d2