@snail-js/api
Version:
Http Request with Decorators Api, build on axios
16 lines (15 loc) • 429 B
TypeScript
export type SseProxy<T extends object> = {
[K in keyof T]: T[K] extends (...args: infer A) => any ? () => () => {
close: () => void;
eventSource: EventSource;
} : T[K];
};
export declare class SseEventListener {
eventName: string;
emit: (event: any) => any;
options: boolean | AddEventListenerOptions;
}
export declare class SseOptions {
withCredentials?: boolean;
version?: string;
}