diff --git a/types/react-native-push-notification/index.d.ts b/types/react-native-push-notification/index.d.ts index f33e6c006e..70928287b1 100644 --- a/types/react-native-push-notification/index.d.ts +++ b/types/react-native-push-notification/index.d.ts @@ -84,6 +84,7 @@ export interface PushNotification { requestPermissions( permissions?: Array<"alert" | "badge" | "sound"> ): Promise; + subscribeToTopic(topic: string): void; presentLocalNotification(details: PushNotificationObject): void; scheduleLocalNotification(details: PushNotificationScheduleObject): void; cancelLocalNotifications(details: object): void; diff --git a/types/react-native-push-notification/react-native-push-notification-tests.ts b/types/react-native-push-notification/react-native-push-notification-tests.ts index 60354e0cf7..0f2a94fb85 100644 --- a/types/react-native-push-notification/react-native-push-notification-tests.ts +++ b/types/react-native-push-notification/react-native-push-notification-tests.ts @@ -15,6 +15,7 @@ PushNotification.unregister(); PushNotification.localNotification = (details) => {}; PushNotification.localNotificationSchedule = (details) => {}; PushNotification.requestPermissions(); +PushNotification.subscribeToTopic("topic"); PushNotification.presentLocalNotification = (details) => {}; PushNotification.scheduleLocalNotification = (details) => {}; PushNotification.cancelLocalNotifications = (details) => {};