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:
Željko Brcković 2023-07-11 19:25:29 +02:00 committed by GitHub
parent 0527afe935
commit fbd523f36a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}