mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
docs(broadcaster): fix jsdocs
This commit is contained in:
parent
e095eecf5b
commit
7ed6ab894b
@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
/**
|
||||
@ -32,10 +32,9 @@ import { Observable } from 'rxjs/Observable';
|
||||
})
|
||||
@Injectable()
|
||||
export class Broadcaster extends IonicNativePlugin {
|
||||
|
||||
/**
|
||||
* This function listen to an event sent from the native code
|
||||
* @param eventName {string}
|
||||
* @param {string} eventName
|
||||
* @return {Observable<any>} Returns an observable to watch when an event is received
|
||||
*/
|
||||
@Cordova({
|
||||
@ -43,15 +42,18 @@ export class Broadcaster extends IonicNativePlugin {
|
||||
clearFunction: 'removeEventListener',
|
||||
clearWithArgs: true
|
||||
})
|
||||
addEventListener(eventName: string): Observable<any> { return; }
|
||||
addEventListener(eventName: string): Observable<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function sends data to the native code
|
||||
* @param eventName {string}
|
||||
* @param eventData {any}
|
||||
* @param {string} eventName
|
||||
* @param {any} eventData
|
||||
* @return {Promise<any>} Returns a promise that resolves when an event is successfully fired
|
||||
*/
|
||||
@Cordova()
|
||||
fireNativeEvent(eventName: string, eventData: any): Promise<any> { return; }
|
||||
|
||||
fireNativeEvent(eventName: string, eventData: any): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user