mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Changes `EventEmitter.js` to be Flow-typed so that it can export an interface for `EventSubscription`. In order to retain the untyped-ness of `EventEmitter.js`, I moved the entire definition into an untyped `_EventEmitter.js` file (which I hope no one will try importing from). This new interface will be used to replace all the current type imports of `EventSubscription` and `EmitterSubscription`. Changelog: [Internal] (Note: this ignores all push blocking failures!) Reviewed By: cpojer Differential Revision: D22182311 fbshipit-source-id: c604a371a91963116621e89ca63f5a82167090b9
21 lines
419 B
JavaScript
21 lines
419 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-local
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
// $FlowFixMe - EventEmitter Type Safety
|
|
const EventEmitter = require('./_EventEmitter');
|
|
|
|
export default EventEmitter;
|
|
|
|
export interface EventSubscription {
|
|
remove(): void;
|
|
}
|