docs(all): standardizes and adds return types, also some param fixes

This commit is contained in:
Alex Muramoto
2016-11-29 16:40:50 -06:00
parent b7a562053a
commit 3da2831779
88 changed files with 635 additions and 347 deletions
+27 -27
View File
@@ -54,7 +54,7 @@ export class LocalNotifications {
/**
* Schedules a single or multiple notifications
* @param options
* @param options {Notification | Array<Notification>} optional
*/
@Cordova({
sync: true
@@ -63,7 +63,7 @@ export class LocalNotifications {
/**
* Updates a previously scheduled notification. Must include the id in the options parameter.
* @param options
* @param options {Notification} optional
*/
@Cordova({
sync: true
@@ -72,15 +72,15 @@ export class LocalNotifications {
/**
* Clears single or multiple notifications
* @param notificationId A single notification id, or an array of notification ids.
* @returns {Promise} Returns a promise when the notification had been cleared
* @param notificationId {any} A single notification id, or an array of notification ids.
* @returns {Promise<any>} Returns a promise when the notification had been cleared
*/
@Cordova()
static clear(notificationId: any): Promise<any> { return; }
/**
* Clears all notifications
* @returns {Promise} Returns a promise when all notifications have cleared
* @returns {Promise<any>} Returns a promise when all notifications have cleared
*/
@Cordova({
successIndex: 0,
@@ -90,15 +90,15 @@ export class LocalNotifications {
/**
* Cancels single or multiple notifications
* @param notificationId A single notification id, or an array of notification ids.
* @returns {Promise} Returns a promise when the notification is canceled
* @param notificationId {any} A single notification id, or an array of notification ids.
* @returns {Promise<any>} Returns a promise when the notification is canceled
*/
@Cordova()
static cancel(notificationId: any): Promise<any> { return; }
/**
* Cancels all notifications
* @returns {Promise} Returns a promise when all notifications are canceled
* @returns {Promise<any>} Returns a promise when all notifications are canceled
*/
@Cordova({
successIndex: 0,
@@ -108,61 +108,61 @@ export class LocalNotifications {
/**
* Checks presence of a notification
* @param notificationId
* @returns {Promise} Returns a promise
* @param notificationId {number}
* @returns {Promise<boolean>}
*/
@Cordova()
static isPresent(notificationId: number): Promise<boolean> { return; }
/**
* Checks is a notification is scheduled
* @param notificationId
* @returns {Promise} Returns a promise
* @param notificationId {number}
* @returns {Promise<boolean>}
*/
@Cordova()
static isScheduled(notificationId: number): Promise<boolean> { return; }
/**
* Checks if a notification is triggered
* @param notificationId
* @returns {Promise} Returns a promise
* @param notificationId {number}
* @returns {Promise<boolean>}
*/
@Cordova()
static isTriggered(notificationId: number): Promise<boolean> { return; }
/**
* Get all the notification ids
* @returns {Promise} Returns a promise
* @returns {Promise<Array<number>>}
*/
@Cordova()
static getAllIds(): Promise<Array<number>> { return; }
/**
* Get the ids of triggered notifications
* @returns {Promise} Returns a promise
* @returns {Promise<Array<number>>}
*/
@Cordova()
static getTriggeredIds(): Promise<Array<number>> { return; }
/**
* Get the ids of scheduled notifications
* @returns {Promise} Returns a promise
* @returns {Promise<Array<number>>} Returns a promise
*/
@Cordova()
static getScheduledIds(): Promise<Array<number>> { return; }
/**
* Get a notification object
* @param notificationId The id of the notification to get
* @returns {Promise} Returns a promise
* @param notificationId {any} The id of the notification to get
* @returns {Promise<Notification>}
*/
@Cordova()
static get(notificationId: any): Promise<Notification> { return; }
/**
* Get a scheduled notification object
* @param notificationId The id of the notification to get
* @returns {Promise} Returns a promise
* @param notificationId {any} The id of the notification to get
* @returns {Promise<Notification>}
*/
@Cordova()
static getScheduled(notificationId: any): Promise<Notification> { return; }
@@ -170,42 +170,42 @@ export class LocalNotifications {
/**
* Get a triggered notification object
* @param notificationId The id of the notification to get
* @returns {Promise} Returns a promise
* @returns {Promise<Notification>}
*/
@Cordova()
static getTriggered(notificationId: any): Promise<Notification> { return; }
/**
* Get all notification objects
* @returns {Promise} Returns a promise
* @returns {Promise<Array<Notification>>}
*/
@Cordova()
static getAll(): Promise<Array<Notification>> { return; }
/**
* Get all scheduled notification objects
* @returns {Promise} Returns a promise
* @returns {Promise<Array<Notification>>}
*/
@Cordova()
static getAllScheduled(): Promise<Array<Notification>> { return; }
/**
* Get all triggered notification objects
* @returns {Promise} Returns a promise
* @returns {Promise<Array<Notification>>}
*/
@Cordova()
static getAllTriggered(): Promise<Array<Notification>> { return; }
/**
* Register permission to show notifications if not already granted.
* @returns {Promise} Returns a promise
* @returns {Promise<boolean>}
*/
@Cordova()
static registerPermission(): Promise<boolean> { return; }
/**
* Informs if the app has the permission to show notifications.
* @returns {Promise} Returns a promise
* @returns {Promise<boolean>}
*/
@Cordova()
static hasPermission(): Promise<boolean> { return; }