type DispatcherOptions = Record<string, unknown> | undefined;
type UndiciBody = {
    arrayBuffer(): Promise<ArrayBuffer>;
    text(): Promise<string>;
    json(): Promise<unknown>;
    [Symbol.asyncIterator](): AsyncIterator<Uint8Array>;
};
export declare class Dispatcher {
    readonly options: DispatcherOptions;
    constructor(options?: DispatcherOptions);
    dispatch(): boolean;
    close(callback?: () => void): Promise<void> | void;
    destroy(_error?: Error, callback?: () => void): Promise<void> | void;
}
export declare class Agent extends Dispatcher {
}
export declare class Pool extends Dispatcher {
}
export declare class BalancedPool extends Dispatcher {
}
export declare class Client extends Dispatcher {
}
export declare class ProxyAgent extends Dispatcher {
}
export declare class EnvHttpProxyAgent extends Dispatcher {
}
export declare class MockAgent extends Dispatcher {
    disableNetConnect(): void;
    enableNetConnect(): void;
}
export declare function setGlobalDispatcher(dispatcher: Dispatcher): void;
export declare function getGlobalDispatcher(): Dispatcher;
export declare const fetch: typeof globalThis.fetch;
export declare const Headers: {
    new (init?: HeadersInit): Headers;
    prototype: Headers;
};
export declare const Request: {
    new (input: RequestInfo | URL, init?: RequestInit): Request;
    prototype: Request;
};
export declare const Response: {
    new (body?: BodyInit | null, init?: ResponseInit): Response;
    prototype: Response;
    error(): Response;
    json(data: any, init?: ResponseInit): Response;
    redirect(url: string | URL, status?: number): Response;
};
export declare const FormData: {
    new (form?: HTMLFormElement, submitter?: HTMLElement | null): FormData;
    prototype: FormData;
};
export declare const WebSocket: {
    new (url: string | URL, protocols?: string | string[]): WebSocket;
    prototype: WebSocket;
    readonly CONNECTING: 0;
    readonly OPEN: 1;
    readonly CLOSING: 2;
    readonly CLOSED: 3;
};
export declare const File: {
    new (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
    prototype: File;
};
export declare function install(): void;
export declare function request(input: RequestInfo | URL, init?: RequestInit): Promise<{
    statusCode: number;
    headers: Record<string, string>;
    body: UndiciBody;
    trailers: Record<string, string>;
    opaque: null;
    context: null;
}>;
export declare function stream(input: RequestInfo | URL, initOrFactory?: RequestInit | ((data: {
    statusCode: number;
    headers: Record<string, string>;
}) => unknown), maybeFactory?: (data: {
    statusCode: number;
    headers: Record<string, string>;
}) => unknown): Promise<unknown>;
export declare function pipeline(input: RequestInfo | URL, initOrHandler?: RequestInit | ((data: {
    statusCode: number;
    headers: Record<string, string>;
}) => unknown), maybeHandler?: (data: {
    statusCode: number;
    headers: Record<string, string>;
}) => unknown): Promise<unknown>;
export declare function connect(): Promise<never>;
export declare function upgrade(): never;
export declare const errors: {};
declare const _default: {
    Agent: typeof Agent;
    BalancedPool: typeof BalancedPool;
    Client: typeof Client;
    Dispatcher: typeof Dispatcher;
    EnvHttpProxyAgent: typeof EnvHttpProxyAgent;
    MockAgent: typeof MockAgent;
    Pool: typeof Pool;
    ProxyAgent: typeof ProxyAgent;
    Headers: {
        new (init?: HeadersInit): Headers;
        prototype: Headers;
    };
    Request: {
        new (input: RequestInfo | URL, init?: RequestInit): Request;
        prototype: Request;
    };
    Response: {
        new (body?: BodyInit | null, init?: ResponseInit): Response;
        prototype: Response;
        error(): Response;
        json(data: any, init?: ResponseInit): Response;
        redirect(url: string | URL, status?: number): Response;
    };
    FormData: {
        new (form?: HTMLFormElement, submitter?: HTMLElement | null): FormData;
        prototype: FormData;
    };
    File: {
        new (fileBits: BlobPart[], fileName: string, options?: FilePropertyBag): File;
        prototype: File;
    };
    WebSocket: {
        new (url: string | URL, protocols?: string | string[]): WebSocket;
        prototype: WebSocket;
        readonly CONNECTING: 0;
        readonly OPEN: 1;
        readonly CLOSING: 2;
        readonly CLOSED: 3;
    };
    connect: typeof connect;
    errors: {};
    fetch: typeof globalThis.fetch;
    getGlobalDispatcher: typeof getGlobalDispatcher;
    install: typeof install;
    pipeline: typeof pipeline;
    request: typeof request;
    setGlobalDispatcher: typeof setGlobalDispatcher;
    stream: typeof stream;
    upgrade: typeof upgrade;
};
export default _default;
//# sourceMappingURL=undici.d.ts.map