mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-22 01:19:36 +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;
|
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
|
* @name Firebase X
|
||||||
* @description
|
* @description
|
||||||
@ -237,7 +249,7 @@ export class FirebaseX extends AwesomeCordovaNativePlugin {
|
|||||||
@Cordova({
|
@Cordova({
|
||||||
observable: true,
|
observable: true,
|
||||||
})
|
})
|
||||||
onMessageReceived(): Observable<any> {
|
onMessageReceived<T = { [key: string]: string }>(): Observable<MessagePayload & T> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user