export type ActiveCall<In, Out> = {
    gen: AsyncGenerator<In, Error | void, void>;
    send(data: Out): void;
};
export type RemoteCall<Init = never> = {
    call<In = any, Out = any>(signal: AbortSignal): ActiveCall<In, Out>;
    init: Init;
    done: Promise<void>;
};
/**
 * Starts a connection to the remote URL.
 *
 * Notably this does not deal with r/c; it returns a {@link Promise} that resolves when ready.
 * Use the returned {@link RemoteCall} to call on _this active connection only_.
 *
 * Uses the protocol as implemented here: https://pkg.go.dev/github.com/samthor/thorgo/call
 */
export declare function startRemoteCall<Init = never>(signal: AbortSignal, url: string): Promise<RemoteCall<Init>>;
/**
 * Wraps a 'normal' shutdown from the remote end of a {@link RemoteCall} / {@link ActiveCall}.
 */
export declare class RemoteCallError extends Error {
    readonly stop: string;
    constructor(stop: string);
}
