refactor(local-notification):

This commit is contained in:
Guille 2016-07-17 19:59:26 +02:00
parent 0231220c6f
commit 34e038d3ca

View File

@ -1,4 +1,6 @@
import {Plugin, Cordova} from './plugin'; import { Cordova, Plugin } from './plugin';
/** /**
* @name Local Notifications * @name Local Notifications
* @description * @description
@ -57,7 +59,7 @@ export class LocalNotifications {
@Cordova({ @Cordova({
sync: true sync: true
}) })
static schedule(options?: Notification|Array<Notification>): void {} static schedule(options?: Notification | Array<Notification>): void { }
/** /**
* Updates a previously scheduled notification. Must include the id in the options parameter. * Updates a previously scheduled notification. Must include the id in the options parameter.
@ -66,14 +68,14 @@ export class LocalNotifications {
@Cordova({ @Cordova({
sync: true sync: true
}) })
static update(options?: Notification): void {} static update(options?: Notification): void { }
/** /**
* Clears single or multiple notifications * Clears single or multiple notifications
* @param notificationId A single notification id, or an array of notification ids. * @param notificationId A single notification id, or an array of notification ids.
*/ */
@Cordova() @Cordova()
static clear(notificationId: any): Promise<any> {return; } static clear(notificationId: any): Promise<any> { return; }
/** /**
* Clears all notifications * Clears all notifications
@ -82,14 +84,14 @@ export class LocalNotifications {
successIndex: 0, successIndex: 0,
errorIndex: 2 errorIndex: 2
}) })
static clearAll(): Promise<any> {return; } static clearAll(): Promise<any> { return; }
/** /**
* Cancels single or multiple notifications * Cancels single or multiple notifications
* @param notificationId A single notification id, or an array of notification ids. * @param notificationId A single notification id, or an array of notification ids.
*/ */
@Cordova() @Cordova()
static cancel(notificationId: any): Promise<any> {return; } static cancel(notificationId: any): Promise<any> { return; }
/** /**
* Cancels all notifications * Cancels all notifications
@ -98,85 +100,85 @@ export class LocalNotifications {
successIndex: 0, successIndex: 0,
errorIndex: 2 errorIndex: 2
}) })
static cancelAll(): Promise<any> {return; } static cancelAll(): Promise<any> { return; }
/** /**
* Checks presence of a notification * Checks presence of a notification
* @param notificationId * @param notificationId
*/ */
@Cordova() @Cordova()
static isPresent (notificationId: number): Promise<boolean> {return; } static isPresent(notificationId: number): Promise<boolean> { return; }
/** /**
* Checks is a notification is scheduled * Checks is a notification is scheduled
* @param notificationId * @param notificationId
*/ */
@Cordova() @Cordova()
static isScheduled (notificationId: number): Promise<boolean> {return; } static isScheduled(notificationId: number): Promise<boolean> { return; }
/** /**
* Checks if a notification is triggered * Checks if a notification is triggered
* @param notificationId * @param notificationId
*/ */
@Cordova() @Cordova()
static isTriggered (notificationId: number): Promise<boolean> {return; } static isTriggered(notificationId: number): Promise<boolean> { return; }
/** /**
* Get all the notification ids * Get all the notification ids
*/ */
@Cordova() @Cordova()
static getAllIds (): Promise<Array<number>> {return; } static getAllIds(): Promise<Array<number>> { return; }
/** /**
* Get the ids of triggered notifications * Get the ids of triggered notifications
*/ */
@Cordova() @Cordova()
static getTriggeredIds (): Promise<Array<number>> {return; } static getTriggeredIds(): Promise<Array<number>> { return; }
/** /**
* Get the ids of scheduled notifications * Get the ids of scheduled notifications
*/ */
@Cordova() @Cordova()
static getScheduledIds (): Promise<Array<number>> {return; } static getScheduledIds(): Promise<Array<number>> { return; }
/** /**
* Get a notification object * Get a notification object
* @param notificationId The id of the notification to get * @param notificationId The id of the notification to get
*/ */
@Cordova() @Cordova()
static get (notificationId: any): Promise <Notification> {return; } static get(notificationId: any): Promise<Notification> { return; }
/** /**
* Get a scheduled notification object * Get a scheduled notification object
* @param notificationId The id of the notification to get * @param notificationId The id of the notification to get
*/ */
@Cordova() @Cordova()
static getScheduled (notificationId: any): Promise <Notification> {return; } static getScheduled(notificationId: any): Promise<Notification> { return; }
/** /**
* Get a triggered notification object * Get a triggered notification object
* @param notificationId The id of the notification to get * @param notificationId The id of the notification to get
*/ */
@Cordova() @Cordova()
static getTriggered (notificationId: any): Promise <Notification> {return; } static getTriggered(notificationId: any): Promise<Notification> { return; }
/** /**
* Get all notification objects * Get all notification objects
*/ */
@Cordova() @Cordova()
static getAll(): Promise<Array<Notification>> {return; } static getAll(): Promise<Array<Notification>> { return; }
/** /**
* Get all scheduled notification objects * Get all scheduled notification objects
*/ */
@Cordova() @Cordova()
static getAllScheduled(): Promise<Array<Notification>> {return; } static getAllScheduled(): Promise<Array<Notification>> { return; }
/** /**
* Get all triggered notification objects * Get all triggered notification objects
*/ */
@Cordova() @Cordova()
static getAllTriggered(): Promise<Array<Notification>> {return; } static getAllTriggered(): Promise<Array<Notification>> { return; }
/** /**
@ -187,7 +189,7 @@ export class LocalNotifications {
@Cordova({ @Cordova({
sync: true sync: true
}) })
static on(eventName: string, callback: any): void {} static on(eventName: string, callback: any): void { }
} }