import type { AliyunPopOptions } from '../requestPop'; export interface SseResponse { dispose: () => void; } export interface SseOptions extends Omit { /** * sse请求参数 */ body: any; /** * 请求token的时候的参数 */ params?: Record; /** * 超时时长 */ timeout?: number; /** * 发生错误时候的回掉函数 * @param error 错误信息 */ onError?: (error: any) => void; /** * 发生消息时候的回调函数 */ onMessage?: (data: T) => void; /** * 关闭时候的回调函数 */ onClose?: () => void; } /** * pop sse请求 */ export default function requestPopSse(options: SseOptions): Promise;