mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
41b6884a1b
Summary: Changes the to-be-legacy `_EventSubscription` and `_EmitterSubscription` classes to implement the event-agnostic `EventSubscription` interface. This interface is valuable because it abstracts away the event definitions. Changelog: [Internal] Reviewed By: lunaleaps Differential Revision: D26155911 fbshipit-source-id: f94280976d4f9219f4780ac8fae0d5fbc1865386
20 lines
487 B
JavaScript
20 lines
487 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow strict
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
// This exists as a separate file only to avoid circular dependencies from
|
|
// using this in `_EmitterSubscription`. Combine this back into `EventEmitter`
|
|
// after migration and cleanup is done.
|
|
|
|
export interface EventSubscription {
|
|
remove(): void;
|
|
}
|