From fdf4ec32975eeec41e0b4b8145c4e45798c82607 Mon Sep 17 00:00:00 2001 From: Ingrid Wang Date: Fri, 16 Feb 2024 15:22:49 -0800 Subject: [PATCH] Remove unused handler on PushNotificationIOS.removeEventListener (#43037) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43037 Changelog: [iOS][Breaking] Removing unused `handler` param on PushNotificationIOS.removeEventListener Reviewed By: philIip Differential Revision: D53781102 fbshipit-source-id: a3372d0ccb4addf9983c143fb1a3e206f6aae103 --- .../Libraries/PushNotificationIOS/PushNotificationIOS.js | 5 +---- .../__tests__/__snapshots__/public-api-test.js.snap | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/react-native/Libraries/PushNotificationIOS/PushNotificationIOS.js b/packages/react-native/Libraries/PushNotificationIOS/PushNotificationIOS.js index 3206a5d9f0eff8..9453c82b9ab8be 100644 --- a/packages/react-native/Libraries/PushNotificationIOS/PushNotificationIOS.js +++ b/packages/react-native/Libraries/PushNotificationIOS/PushNotificationIOS.js @@ -308,10 +308,7 @@ class PushNotificationIOS { * * See https://reactnative.dev/docs/pushnotificationios#removeeventlistener */ - static removeEventListener( - type: PushNotificationEventName, - handler: Function, - ): void { + static removeEventListener(type: PushNotificationEventName): void { invariant( type === 'notification' || type === 'register' || diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap index fd9e30326affea..fd67444f9e4a4d 100644 --- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap +++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap @@ -6372,10 +6372,7 @@ declare class PushNotificationIOS { type: PushNotificationEventName, handler: Function ): void; - static removeEventListener( - type: PushNotificationEventName, - handler: Function - ): void; + static removeEventListener(type: PushNotificationEventName): void; static requestPermissions(permissions?: { alert?: boolean, badge?: boolean,