mirror of https://github.com/espruino/BangleApps
typescript: sched.d.ts: distinguish between Timer & Sched
parent
2517f80754
commit
6f4a3b8c78
|
@ -77,6 +77,8 @@ declare module Sched {
|
|||
}
|
||||
);
|
||||
|
||||
type Timer = Sched & { timer: Milliseconds };
|
||||
|
||||
type Repeat = {
|
||||
num: number,
|
||||
interval: "day" | "week" | "month" | "year",
|
||||
|
@ -103,7 +105,7 @@ declare module Sched {
|
|||
|
||||
function setAlarm(id: string, alarm?: NewSched): void;
|
||||
|
||||
function resetTimer(alarm: Sched, time?: Date): void;
|
||||
function resetTimer(alarm: Timer, time?: Date): void;
|
||||
|
||||
function getTimeToAlarm(alarm: Sched | undefined | null, time?: Date): number | undefined;
|
||||
function getTimeToAlarm(alarm?: undefined | null, time?: Date): undefined;
|
||||
|
|
Loading…
Reference in New Issue