Skip to content

Commit

Permalink
RN: Delete EventEmitter#removeSubscription
Browse files Browse the repository at this point in the history
Summary:
Deletes `EventEmitter#removeSubscription`, which has been deprecated since D27704279 (cb6cbd1).

Relatedly, the `removeListener` family of methods (which were deprecated ad the same time) were recently removed by D35549719 (2596b2f).

Changelog:
[General][Removed] - Removed `EventEmitter.prototype.removeSubscription` method.

Reviewed By: christophpurrer

Differential Revision: D36171048

fbshipit-source-id: 2409d235d43049cddfe0a54bcc60e1f47d4185c5
  • Loading branch information
yungsters authored and facebook-github-bot committed May 5, 2022
1 parent 018d5cf commit 870755f
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions Libraries/vendor/emitter/_EventEmitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,6 @@ class EventEmitter<EventDefinitions: {...}> {
this._subscriber.removeAllSubscriptions(eventType);
}

/**
* @deprecated Use `remove` on the EventSubscription from `addListener`.
*/
removeSubscription<K: $Keys<EventDefinitions>>(
subscription: EmitterSubscription<EventDefinitions, K>,
): 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.
*/
Expand Down

0 comments on commit 870755f

Please sign in to comment.