Client fixes

Summary:
Event emitter was typed any. Therefore, Client extended any and thing went south.
removing the explicit any type and fixing flow errors.

Reviewed By: jknoxville

Differential Revision: D15987630

fbshipit-source-id: 9456149d46f839d9579fcc2671ab2a82935fc23a
This commit is contained in:
Daniel Büchele
2019-07-01 02:32:12 -07:00
committed by Facebook Github Bot
parent 1a0ee24b1a
commit 468468a3bc
3 changed files with 7 additions and 7 deletions

View File

@@ -22,7 +22,7 @@ import {default as isProduction} from './utils/isProduction.js';
import {registerPlugins} from './reducers/plugins';
import createTableNativePlugin from './plugins/TableNativePlugin';
const EventEmitter = (require('events'): any);
const EventEmitter = require('events');
const invariant = require('invariant');
type Plugins = Array<string>;
@@ -196,9 +196,6 @@ export default class Client extends EventEmitter {
);
}
on: ((event: 'plugins-change', callback: () => void) => void) &
((event: 'close', callback: () => void) => void);
app: App;
connected: boolean;
id: string;
@@ -211,7 +208,8 @@ export default class Client extends EventEmitter {
store: Store;
activePlugins: Set<string>;
device: Promise<BaseDevice>;
logger: Logger;
lastSeenDeviceList: Array<BaseDevice>;
broadcastCallbacks: Map<?string, Map<string, Set<Function>>>;
requestCallbacks: Map<