import { EventInterface } from 'microevent.ts' ; interface RpcProviderInterface { dispatch ( message ) : void ; rpc < T = void , U = void > ( id , payload ? , transfer ? ) : Promise < U > ; signal < T = void > ( id , payload ? , transfer ? ) : this ; registerRpcHandler < T = void , U = void > ( id , handler ) : this ; registerSignalHandler < T = void > ( id , handler ) : this ; deregisterRpcHandler < T = void , U = void > ( id , handler ) : this ; deregisterSignalHandler < T = void > ( id , handler ) : this ; error : EventInterface < Error > ; } module RpcProviderInterface { export interface RpcHandler < T = void , U = void > { ( payload ) : Promise < U > | U ; } export interface SignalHandler < T = void > { ( payload ) : void ; } } export default RpcProviderInterface ;