format import { ClientResponseType } from 'flipper-common' ; export interface PendingRequestResolvers { resolve : ( data : ClientResponseType ) => void ; reject : ( err : Error ) => void ; } export enum ConnectionStatus { ERROR = 'error' , CLOSED = 'closed' , CONNECTED = 'connected' , NOT_CONNECTED = 'not_connected' , CONNECTING = 'connecting' } export type ConnectionStatusChange = ( status : ConnectionStatus ) => void ; export interface ClientConnection { subscribeToEvents ( subscriber ) : void ; close ( ) : void ; send ( data ) : void ; sendExpectResponse ( data ) : Promise < ClientResponseType > ; }