From 870755fa7e7011ac46d269d5fb66d2a1d1543442 Mon Sep 17 00:00:00 2001 From: Tim Yung Date: Thu, 5 May 2022 12:55:00 -0700 Subject: [PATCH] RN: Delete `EventEmitter#removeSubscription` Summary: Deletes `EventEmitter#removeSubscription`, which has been deprecated since D27704279 (https://github.com/facebook/react-native/commit/cb6cbd12f80152b4ce742f37e2e6eefadf89d927). Relatedly, the `removeListener` family of methods (which were deprecated ad the same time) were recently removed by D35549719 (https://github.com/facebook/react-native/commit/2596b2f6954362d2cd34a1be870810ab90cbb916). Changelog: [General][Removed] - Removed `EventEmitter.prototype.removeSubscription` method. Reviewed By: christophpurrer Differential Revision: D36171048 fbshipit-source-id: 2409d235d43049cddfe0a54bcc60e1f47d4185c5 --- Libraries/vendor/emitter/_EventEmitter.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Libraries/vendor/emitter/_EventEmitter.js b/Libraries/vendor/emitter/_EventEmitter.js index 38addf8b7b2111..f1d97e9d5e93e4 100644 --- a/Libraries/vendor/emitter/_EventEmitter.js +++ b/Libraries/vendor/emitter/_EventEmitter.js @@ -78,19 +78,6 @@ class EventEmitter { this._subscriber.removeAllSubscriptions(eventType); } - /** - * @deprecated Use `remove` on the EventSubscription from `addListener`. - */ - removeSubscription>( - subscription: EmitterSubscription, - ): void { - console.warn( - 'EventEmitter.removeSubscription(...): Method has been deprecated. ' + - 'Please instead use `remove()` on the subscription itself.', - ); - this.__removeSubscription(subscription); - } - /** * Called by `EmitterSubscription` to bypass the above deprecation warning. */