react-native-macos/Libraries/vendor
Tim Yung e5c5dcd9e2 RN: Rewrite EventEmitter
Summary:
Rewrites `EventEmitter` as a simple, type-safe abstraction with a minimal interface.

The public interface of `EventEmitter` is unchanged. This rewrite was made possible only after deprecating and removing public methods that imposed restrictions on implementation details (e.g. deleting `removeListener`).

However, this includes a subtle breaking change that makes it behave the same as `EventEmitter` in Node.js and `EventTarget` in the DOM. The set of listeners being notified by `emit` will no longer be influenced by changes made during the course of notifying the existing listeners.

Changelog:
[General][Changed] - `EventEmitter#emit` now freezes the set of listeners before iterating over them, meaning listeners that are added or removed will not affect that iteration.

Reviewed By: javache

Differential Revision: D22153962

fbshipit-source-id: 81b87113590dee0296eff61374bf732171855453
2022-06-18 08:23:32 -07:00
..
core Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
emitter RN: Rewrite EventEmitter 2022-06-18 08:23:32 -07:00