DefinitelyTyped/types/react-native-push-notification/react-native-push-notification-tests.ts
Tony Gaskell c066174151 @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
2018-10-03 11:50:28 -07:00

29 lines
1.2 KiB
TypeScript

import PushNotification from 'react-native-push-notification';
PushNotification.configure({
onNotification: (notification) => {
notification.finish("UIBackgroundFetchResultNoData");
},
onRegister: (token) => {},
senderID: 'XXX',
permissions: { alert: true, badge: true, sound: true },
popInitialNotification: false,
requestPermissions: true,
});
PushNotification.unregister();
PushNotification.localNotification = (details) => {};
PushNotification.localNotificationSchedule = (details) => {};
PushNotification.requestPermissions();
PushNotification.presentLocalNotification = (details) => {};
PushNotification.scheduleLocalNotification = (details) => {};
PushNotification.cancelLocalNotifications = (details) => {};
PushNotification.cancelAllLocalNotifications();
PushNotification.setApplicationIconBadgeNumber(1);
PushNotification.getApplicationIconBadgeNumber((badgeCount) => {});
PushNotification.popInitialNotification((notification) => {});
PushNotification.checkPermissions((checkPermissions) => {});
PushNotification.abandonPermissions();
PushNotification.registerNotificationActions(['Accept', 'Reject', 'Yes', 'No']);
PushNotification.clearAllNotifications();