Improvements on documentation (#340)

* Improvements on documentation and some refactor

* ts | js -> typescript (docs)
This commit is contained in:
Guillermo
2016-07-20 17:17:09 +02:00
committed by Ibrahim Hadeed
parent d4d30ab9c9
commit 7952f9ef60
65 changed files with 281 additions and 279 deletions
+10 -13
View File
@@ -65,19 +65,19 @@ export interface PushNotification {
* @param event
* @param callback
*/
on(event: "registration", callback: (response: RegistrationEventResponse) => any): void;
on(event: 'registration', callback: (response: RegistrationEventResponse) => any): void;
/**
* The event notification will be triggered each time a push notification is received by a 3rd party push service on the device.
* @param event
* @param callback
*/
on(event: "notification", callback: (response: NotificationEventResponse) => any): void;
on(event: 'notification', callback: (response: NotificationEventResponse) => any): void;
/**
* The event error will trigger when an internal error occurs and the cache is aborted.
* @param event
* @param callback
*/
on(event: "error", callback: (response: Error) => any): void;
on(event: 'error', callback: (response: Error) => any): void;
/**
*
* @param event Name of the event to listen to. See below(above) for all the event names.
@@ -87,9 +87,9 @@ export interface PushNotification {
*/
on(event: string, callback: (response: EventResponse) => any): void;
off(event: "registration", callback: (response: RegistrationEventResponse) => any): void;
off(event: "notification", callback: (response: NotificationEventResponse) => any): void;
off(event: "error", callback: (response: Error) => any): void;
off(event: 'registration', callback: (response: RegistrationEventResponse) => any): void;
off(event: 'notification', callback: (response: NotificationEventResponse) => any): void;
off(event: 'error', callback: (response: Error) => any): void;
/**
* As stated in the example, you will have to store your event handler if you are planning to remove it.
* @param event Name of the event type. The possible event names are the same as for the push.on function.
@@ -279,11 +279,8 @@ declare var PushNotification: {
* For TypeScript users, see the [Push plugin docs about using TypeScript for custom notifications](https://github.com/phonegap/phonegap-plugin-push/blob/master/docs/TYPESCRIPT.md).
*
* @usage
* ```js
* import {Push} from 'ionic-native';
*
*
*
* ```typescript
* import { Push } from 'ionic-native';
* ```
*/
@Plugin({
@@ -299,10 +296,10 @@ export class Push {
* ```
* var push = Push.init({
* android: {
* senderID: "12345679"
* senderID: '12345679'
* },
* ios: {
* alert: "true",
* alert: 'true',
* badge: true,
* sound: 'false'
* },