/
Alarm.d.ts
31 lines (29 loc) · 881 Bytes
/
Alarm.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
* # Alarm
*
* Alarms are alerts which can be attached to Reminder and Event objects.
*
* ### Examples
*
* ```javascript
* let list = ReminderList.findOrCreate("Errands");
* let reminder = list.createReminder();
* reminder.title = "Get more paper towels";
*
* let alarm = Alarm.alarmWithDate((3).days().fromNow());
* reminder.addAlarm(alarm);
* reminder.update();
* ```
*/
declare class Alarm {
/**
* Alarm set to remind at a specific date/time.
* @param date: Date
*/
static alarmWithDate(date: Date): Alarm
/**
* Alarm set to remind at a specific number of seconds relative to the start date of the event. Note that alarms created with this methods are only supported on [[Event]] objects, not [[Reminder]] objects.
* @param seconds: Number seconds from now
*/
static alarmWithOffset(seconds: Number): Alarm
}