Move repeat & date to a mutually inclusive group

master
Rob Pilling 2023-03-09 20:13:30 +00:00
parent 8525fc73da
commit 0be2bbe2f7
1 changed files with 13 additions and 2 deletions

View File

@ -16,10 +16,8 @@ declare module Sched {
appid?: string,
on: boolean,
dow?: number,
date?: `${number}-${number}-${number}`,
msg: string,
last: number,
rp: boolean, // repeat
vibrate?: VibratePattern,
hidden?: boolean,
as?: boolean, // auto snooze
@ -32,8 +30,21 @@ declare module Sched {
} | {
timer: number, // this is a timer - the time in ms
}
) & (
{
date: `${number}-${number}-${number}`,
rp?: Repeat,
} | {
date: undefined,
rp: boolean,
}
);
type Repeat = {
num: number,
interval: "day" | "week" | "month" | "year",
};
type SchedSettings = {
unlockAtBuzz: boolean,
defaultSnoozeMillis: number,