mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-01-30 13:37:35 +00: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:
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,
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user