mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
phonegap-plugin-push: Added missing methods 'subscribe' and 'unsubscibe' (#13496)
* Added missing method definitions 'subscribe' and 'unsubscibe' for the phonegap-plugin-push * Corrected indentation of added lines * Changed errorCallbacks paramaters from optional to required ones; Added additional param description
This commit is contained in:
18
phonegap-plugin-push/index.d.ts
vendored
18
phonegap-plugin-push/index.d.ts
vendored
@@ -55,7 +55,24 @@ declare namespace PhonegapPluginPush {
|
||||
* @param topics
|
||||
*/
|
||||
unregister(successHandler: () => any, errorHandler?: () => any, topics?: string[]): void
|
||||
|
||||
/**
|
||||
* The subscribe method is used when the application wants to subscribe a new topic to receive push notifications.
|
||||
* @param topic Topic to subscribe to.
|
||||
* @param successHandler Is called when the api successfully unregisters.
|
||||
* @param errorHandler Is called when the api encounters an error while unregistering.
|
||||
*/
|
||||
subscribe(topic: string, successHandler: () => any, errorHandler: () => any): void;
|
||||
|
||||
/**
|
||||
* The unsubscribe method is used when the application no longer wants to receive push notifications
|
||||
* from a specific topic but continue to receive other push messages.
|
||||
* @param topic Topic to unsubscribe from.
|
||||
* @param successHandler Is called when the api successfully unregisters.
|
||||
* @param errorHandler Is called when the api encounters an error while unregistering.
|
||||
*/
|
||||
unsubscribe(topic: string, successHandler: () => any, errorHandler: () => any): void;
|
||||
|
||||
/*TODO according to js source code, "errorHandler" is optional, but is "count" also optional? I can't read objetive-C code (can anyone at all? I wonder...)*/
|
||||
/**
|
||||
* Set the badge count visible when the app is not running
|
||||
@@ -68,6 +85,7 @@ declare namespace PhonegapPluginPush {
|
||||
* @param count
|
||||
*/
|
||||
setApplicationIconBadgeNumber(successHandler: () => any, errorHandler: () => any, count: number): void
|
||||
|
||||
/**
|
||||
* Get the current badge count visible when the app is not running
|
||||
* successHandler gets called with an integer which is the current badge count
|
||||
|
||||
Reference in New Issue
Block a user