import { MatchSpec } from "../match"; import Message from "../message"; import * as pubsub from "../pubsub"; import Hub from "../hub"; export interface TopicStoreOptions { pattern?: string | string[]; persistent?: boolean; } /** * Remember last message for each topic. * * A new message with the same topic will overwrite the last message with that * topic, unless the `data` part of the message is `undefined`, in which case * the message is deleted from memory. * * When a new Destination binds to this, all currently remembered topics are * sent to it. */ export declare class TopicStore extends pubsub.BaseSource implements pubsub.Initializable { name: string; private _state; private _matcher; private _storage; private _options; constructor(name: string, options?: TopicStoreOptions); init(hub: Hub): Promise; send(message: Message): void; bind(destination: pubsub.Destination, pattern?: MatchSpec): void; } export default TopicStore;