export type SSEFields = "data" | "event" | "id" | "retry";
export type SSEOutput = Partial<Record<SSEFields, any>>;
export interface VueStreamOptions<Output> {
    /**
     * @description 可读的二进制数据流
     * @link https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream
     */
    readableStream: ReadableStream<Uint8Array>;
    /**
     * @description 支持可定制的transformStream来转换流
     * @default sseTransformStream
     * @link https://developer.mozilla.org/en-US/docs/Web/API/TransformStream
     */
    transformStream?: TransformStream<string, Output>;
}
export declare function useStream(): {
    startStream: <Output = Partial<Record<SSEFields, any>>>(options: VueStreamOptions<Output>) => Promise<void>;
    cancel: () => void;
    data: import('vue').Ref<{
        data?: any;
        id?: any;
        event?: any;
        retry?: any;
    }[], Partial<Record<SSEFields, any>>[] | {
        data?: any;
        id?: any;
        event?: any;
        retry?: any;
    }[]>;
    error: import('vue').Ref<Error | null, Error | null>;
    isLoading: import('vue').Ref<boolean, boolean>;
};
