@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:
Tony Gaskell 2018-10-03 08:50:28 -10:00 committed by Wesley Wigham
parent 41e2d6e23f
commit c066174151
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -6,6 +6,7 @@ PushNotification.configure({
},
onRegister: (token) => {},
senderID: 'XXX',
permissions: { alert: true, badge: true, sound: true },
popInitialNotification: false,
requestPermissions: true,
});