UNPKG

@akala/core

Version:
20 lines (19 loc) 2.23 kB
import * as jsonrpc from '@akala/json-rpc-ws'; import { Api, IClientBuilder, IServerProxyBuilder, IClientProxyBuilder } from './base'; export declare type Connection = jsonrpc.Connection; export declare class JsonRpcWs<TConnection extends jsonrpc.Connection, TServerOneWay, TServerTwoWay, TClientOneWay, TClientTwoWay, TServerOneWayProxy extends TServerOneWay, TServerTwoWayProxy extends TServerTwoWay, TClientOneWayProxy extends TClientOneWay, TClientTwoWayProxy extends TClientTwoWay> implements IServerProxyBuilder<jsonrpc.Client, TConnection, TServerOneWay, TServerTwoWay, TClientOneWay, TClientTwoWay, TServerOneWayProxy, TServerTwoWayProxy, TClientOneWayProxy, TClientTwoWayProxy>, IClientProxyBuilder<TConnection, TConnection, TServerOneWay, TServerTwoWay, TClientOneWay, TClientTwoWay, TServerOneWayProxy, TServerTwoWayProxy, TClientOneWayProxy, TClientTwoWayProxy>, IClientBuilder<jsonrpc.Client, TConnection, TServerOneWay, TServerTwoWay, TClientOneWay, TClientTwoWay, TServerOneWayProxy, TServerTwoWayProxy, TClientOneWayProxy, TClientTwoWayProxy> { api: Api<TConnection, TServerOneWay, TServerTwoWay, TClientOneWay, TClientTwoWay, TServerOneWayProxy, TServerTwoWayProxy, TClientOneWayProxy, TClientTwoWayProxy>; constructor(api: Api<TConnection, TServerOneWay, TServerTwoWay, TClientOneWay, TClientTwoWay, TServerOneWayProxy, TServerTwoWayProxy, TClientOneWayProxy, TClientTwoWayProxy>); createServerProxy(client: jsonrpc.Client): Partial<TServerOneWayProxy & TServerTwoWayProxy>; createClientProxy(client: TConnection): Partial<TClientOneWayProxy & TClientTwoWayProxy>; createClientFromAbsoluteUrl<T extends TClientOneWay & TClientTwoWay>(url: string, clientImpl: T, ...rest: any[]): PromiseLike<T & { $proxy(): Partial<TServerOneWayProxy & TServerTwoWayProxy>; }>; createLateBoundClient<T extends TClientOneWay & TClientTwoWay>(clientImpl: T): T & { $proxy(): Partial<TServerOneWayProxy & TServerTwoWayProxy>; $connect(url: string, connected: () => void): void; }; createClient<T extends TClientOneWay & TClientTwoWay>(client: jsonrpc.Client, clientImpl: T, ...dummy: any[]): T & { $proxy(): Partial<TServerOneWayProxy & TServerTwoWayProxy>; }; }