mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
feat(firebase-x): add message typing (#4282)
This commit is contained in:
parent
99161e2b73
commit
898e0b8588
@ -112,7 +112,19 @@ export interface FirebaseUser {
|
||||
*/
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export interface MessagePayload {
|
||||
title: string;
|
||||
body: string;
|
||||
collapse_key: string;
|
||||
from: string;
|
||||
id: string;
|
||||
messageType: string;
|
||||
notification_foreground: string;
|
||||
sent_time: string;
|
||||
show_notification: string;
|
||||
ttl: string;
|
||||
tap?: 'background' | 'foreground';
|
||||
}
|
||||
/**
|
||||
* @name Firebase X
|
||||
* @description
|
||||
@ -237,7 +249,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
||||
@Cordova({
|
||||
observable: true,
|
||||
})
|
||||
onMessageReceived(): Observable<any> {
|
||||
onMessageReceived<T = { [key: string]: string }>(): Observable<MessagePayload & T> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user