import { RPCChannel } from "./channel"; import { AnyConstructor } from "./internal"; import { Proxied } from "./proxied"; export declare class Service { /** * Construct a new proxy for this service pointing at the URL specified by the @URL() decorator. * The connection will be established and re-established automatically, the returned service * proxy is immediately available for use. Requests to the proxy will be automatically delayed * while the connection is established and the service object is obtained from the remote endpoint. * @param socketUrl The URL of the WebSocket server which supports WebRPC. */ static proxy(this: AnyConstructor): Proxied; /** * Construct a new proxy for this service pointing at the given WebSocket URL. * The connection will be established and re-established automatically, the returned service * proxy is immediately available for use. Requests to the proxy will be automatically delayed * while the connection is established and the service object is obtained from the remote endpoint. * @param socketUrl The URL of the WebSocket server which supports WebRPC. */ static proxy(this: AnyConstructor, socketUrl: string): Proxied; /** * Construct a new proxy for this service pointing at the given RPCChannel. * The returned service proxy is immediately available for use. Requests to the * proxy will be automatically delayed while the channel promise is resolved and the * service object is obtained from the remote endpoint. * @param channel A promise for obtaining the channel to use */ static proxy(this: AnyConstructor, channel: Promise): Proxied; /** * Construct a new proxy for this service pointing at the given RPCChannel. * The returned service proxy is immediately available for use. Requests to the * proxy will be automatically delayed while the service object is obtained from the * remote endpoint. * @param channel The channel to connect to */ static proxy(this: AnyConstructor, channel: RPCChannel): Proxied; }