interface IUseMessagesProps<TTopic extends string> {
    topics: TTopic[];
    onConnect?: () => void;
    onError?: (error: Error) => void;
    onMessage: (topic: TTopic, message: string) => void;
    onClose?: () => void;
}
declare const useMessages: <TTopic extends string>({ topics, onConnect, onError, onMessage, onClose, }: IUseMessagesProps<TTopic>) => {
    messages: Record<string, {
        messages: string[];
        removeListener: () => void;
    }>;
    removeListener: (topic: string) => void;
    registerListener: (topic: string) => void;
};

export { useMessages as default };
