mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-03 21:40:04 +08:00
fix(mobile-messaging): fix event (un)register and saveUser (#4569)
Fix methods for registering and unregistering events and improve comments. Also make return type for saveUser more descriptive.
This commit is contained in:
parent
0527afe935
commit
fbd523f36a
@ -328,16 +328,19 @@ export class MobileMessaging extends AwesomeCordovaNativePlugin {
|
||||
* @param event
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
sync: true,
|
||||
})
|
||||
register(event: Event): Observable<Message> {
|
||||
register(event: Event, handler: Function): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias for `register`.
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
sync: true,
|
||||
})
|
||||
on(event: Event): Observable<Message> {
|
||||
on(event: Event, handler: Function): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -350,16 +353,19 @@ export class MobileMessaging extends AwesomeCordovaNativePlugin {
|
||||
* @param {Function} handler will be unregistered from event
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
sync: true,
|
||||
})
|
||||
unregister(event: Event): Observable<Message> {
|
||||
unregister(event: Event, handler: Function): void {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alias for `unregister`.
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
sync: true,
|
||||
})
|
||||
off(event: Event): Observable<Message> {
|
||||
off(event: Event, handler: Function): void {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -419,7 +425,7 @@ export class MobileMessaging extends AwesomeCordovaNativePlugin {
|
||||
* @param {Object} userData. An object containing user data
|
||||
*/
|
||||
@Cordova()
|
||||
saveUser(userData: UserData): Promise<any> {
|
||||
saveUser(userData: UserData): Promise<UserData> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user