-
Notifications
You must be signed in to change notification settings - Fork 18
/
ReminderList.d.ts
63 lines (57 loc) · 1.6 KB
/
ReminderList.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
* # ReminderList
*
* ReminderList objects are used to manipulate and create lists in the built-in Reminders app.
*
* ### Examples
*
* ```javascript
* const list = ReminderList.findOrCreate("Groceries");
* let reminder = list.createReminder();
* reminder.title = "Bananas";
* reminder.notes = "Get slightly green ones."
* reminder.update();
* ```
*/
declare class ReminderList {
/**
* The name of the list.
*/
title: string
/**
* All reminders in the list.
*/
readonly tasks: Reminder[]
/**
* Reminders in the list which are NOT completed.
*/
readonly incompleteTasks: Reminder[]
/**
* Reminders in the list which have been marked completed.
*/
readonly completeTasks: Reminder[]
/**
* Save changes to the list.
*/
update(): boolean
/**
* Create a new Reminder object in this list
*/
createReminder(): Reminder
/**
* Searches for a list in the reminders app matching the title. If none is found, creates a new list with that title. If more than one list with the same name exist in Reminders, the first found will be returned.
*/
static findOrCreate(title: string): ReminderList
/**
* Searches for a reminder lists matching the title. If none is found, return undefined.
*/
static find(title: string): ReminderList
/**
* Get an array all known reminder lists on the device.
*/
static getAllReminderLists(): ReminderList[]
/**
* Returns the system default reminder list configured for new reminders.
*/
static default(): ReminderList
}