import { Socket } from 'socket.io-client';
declare global {
    interface Window {
        socketMap: Map<string, Socket>;
    }
}
declare const defaultOption: {
    reconnectionDelayMax: number;
    reconnectionAttempts: number;
    autoConnect: boolean;
    new: boolean;
    forceNew: boolean;
    query: {};
    path: string;
};
/**
 * @description: 默认同URL地址不会创建新的连接，复用同一个
 * @param {string} sUrl
 * @param {typeof} opt
 * @return {*}
 */
export declare const useSocket: (url: string, opt?: typeof defaultOption) => {
    socket: Socket;
    closeAll: () => void;
};
export {};
