mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-01 12:42:58 +08:00
@types/react-native-push-notification: Add missing permissions type on push notification options (#29257)
* Add missing permissions type on push notification options * Refactor PushNotification Options to interface instead of class
This commit is contained in:
committed by
Wesley Wigham
parent
41e2d6e23f
commit
c066174151
@@ -22,10 +22,11 @@ export interface PushNotification {
|
||||
finish: (fetchResult: string) => void;
|
||||
}
|
||||
|
||||
export class PushNotificationOptions {
|
||||
export interface PushNotificationOptions {
|
||||
onRegister?: (token: { os: string, token: string }) => void;
|
||||
onNotification?: (notification: PushNotification) => void;
|
||||
senderID?: string;
|
||||
permissions?: PushNotificationPermissions;
|
||||
popInitialNotification?: boolean;
|
||||
requestPermissions?: boolean;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ PushNotification.configure({
|
||||
},
|
||||
onRegister: (token) => {},
|
||||
senderID: 'XXX',
|
||||
permissions: { alert: true, badge: true, sound: true },
|
||||
popInitialNotification: false,
|
||||
requestPermissions: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user