aboutsummaryrefslogtreecommitdiff
path: root/protocol.d.ts
diff options
context:
space:
mode:
authormetamuffin <yvchraiqi@protonmail.com>2022-06-10 10:00:06 +0200
committermetamuffin <yvchraiqi@protonmail.com>2022-06-10 10:00:06 +0200
commita392a04c83b4e0a8050066280f7efc74d182bcab (patch)
tree976880f1d223d4a113b50b96ba09e1687040dc17 /protocol.d.ts
parentf8edbf82aa2a0a7da8808bc2e196e9f219238467 (diff)
downloadkarlender-a392a04c83b4e0a8050066280f7efc74d182bcab.tar
karlender-a392a04c83b4e0a8050066280f7efc74d182bcab.tar.bz2
karlender-a392a04c83b4e0a8050066280f7efc74d182bcab.tar.zst
blub
Diffstat (limited to 'protocol.d.ts')
-rw-r--r--protocol.d.ts14
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"