Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EventEmitter: Deprecate
removeSubscription
Summary: Deprecates `EventEmitter#removeSubscription`. This required temporarily introducing a new `__removeSubscription` method that is only invoked by `EmitterSubscription`. This is necessary so that we do not completely break usages of `EventEmitter` that are supplying constructor arguments (which is also deprecated, but still supported until the next release). Calling this method will now cause a warning to appear with instructions to instead invoke `remove()` on the subscription itself. Lastly, changed `console.error` deprecation notice to instead use `console.warn`. This is in line with the principle that errors are "broken today" and warnings will be "broken tomorrow". Changelog: [General][Deprecated] - `EventEmitter#removeSubscription` is now deprecated. Reviewed By: rubennorte Differential Revision: D27704279 fbshipit-source-id: 581f5b2ab46b1bcfc1d20898b3d3392988dccbd5
- Loading branch information