export declare const errorHandler: (res: Response) => Promise<{
    error: boolean;
    data: any;
    message?: undefined;
} | {
    error: boolean;
    message: string;
    data?: undefined;
}>;
/**
 *
 * @param params data: for post request, params: for get request
 * @returns
 */
export declare const fetchChunkedData: (params: {
    data?: any;
    url: string;
    params?: any;
    signal?: AbortSignal;
    method?: string;
    headers?: any;
}) => Promise<{
    error: boolean;
    data: any;
    message?: undefined;
} | {
    error: boolean;
    message: string;
    data?: undefined;
} | {
    reader: ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>> | undefined;
    decoder: TextDecoder;
}>;
export declare const createFormData: (data: any) => FormData;
export declare const fetchChunkedDataPostFormData: (params: {
    data?: any;
    url: string;
    params?: any;
    signal?: AbortSignal;
    method?: string;
    headers?: any;
}) => Promise<{
    error: boolean;
    data: any;
    message?: undefined;
} | {
    error: boolean;
    message: string;
    data?: undefined;
} | {
    reader: ReadableStreamDefaultReader<Uint8Array<ArrayBuffer>> | undefined;
    decoder: TextDecoder;
}>;
export declare const readStreamData: (reader: ReadableStreamDefaultReader<Uint8Array>, decoder: TextDecoder, callback: (data: any[]) => void, throttleDelay?: number) => Promise<void>;
export declare const readLargeStreamData: (reader: any, decoder: TextDecoder, callback: (data: any, done?: boolean) => void, throttleDelay?: number) => Promise<void>;
