import type { IRPC, Transport, ErrorCallback, Cache, Format } from './types';
import type { BatchRequest } from '../specs';
export declare function client<T>(init: IRPC.Init): IRPC.Builder<T>;
export declare class RPC<T extends IRPC.Schema> implements IRPC.Client<T> {
    #private;
    errorCallback: ErrorCallback;
    cacheStorage: Cache.Storage;
    endpoint: string;
    internal: Set<string | symbol>;
    options: IRPC.Options;
    constructor({ endpoint, config, options }: IRPC.Init);
    get transport(): Transport;
    get format(): Format;
    isInternal(prop: string): boolean;
    call<P, R>({ method, params }: IRPC.Call<P>): Promise<R | void>;
    private chainUpdate;
    private get currentConfig();
    config(config: ClientConfig): Builder<T>;
    abort(signal: AbortController['signal']): Builder<T>;
    opt(options: IRPC.Options): Builder<T>;
    pipe(): void;
    batch(...calls: BatchRequest): Promise<any>;
    cache(config: CacheConfig): (method: string) => (...params: unknown[]) => Promise<any>;
}
export declare class Builder<T> extends Function {
    path: string[];
    rpc: RPC<T>;
    internal: Set<string | symbol>;
    constructor(rpc: RPC<T>, path?: string[]);
    private get readyMethod();
    isInternal(prop: string): boolean;
    apply<P, R>(target: object, thisArg: unknown, argArray?: P): Promise<R>;
    get(target: Builder<T>, prop: string): any;
    construct<T>(target: Builder<T>, args: unknown[]): BatchRequest;
}
//# sourceMappingURL=index.d.ts.map