react/scripts/flow/react-devtools.js

26 lines
684 B
JavaScript
Raw Normal View History

2019-08-28 01:54:01 +08:00
/**
* 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
*/
2019-01-23 03:04:37 +08:00
declare module 'events' {
declare class EventEmitter<Events: Object> {
addListener<Event: $Keys<Events>>(
event: Event,
2019-08-14 08:58:03 +08:00
listener: (...$ElementType<Events, Event>) => any,
): void;
emit: <Event: $Keys<Events>>(
event: Event,
...$ElementType<Events, Event>
) => void;
removeListener(event: $Keys<Events>, listener: Function): void;
removeAllListeners(event?: $Keys<Events>): void;
2019-01-23 03:04:37 +08:00
}
declare export default typeof EventEmitter;
}