import { Subscriber } from './subscriber';
import { SubscribeOption } from './publisher.model';
/**
 * @author Harsh A. Mistry
 *
 * Topic class for creating new topic. Topic is a medium for communicating between publisher and subscriber. A publisher will create topic and subscriber will
 * subscribe to topic/topics
 */
export declare class Topic {
    private _subscriberList;
    private _currentValue;
    private _topicName;
    constructor(topicName: string);
    /**
     * Publish any event for current topic. Once event is published all active subscribers will get a notification in callback function.
     * @param {any} event
     */
    publish(event: any): void;
    /**
     * Once topic is created, it can be subscribed using this method
     * @param {Function} callback
     * @param {SubscribeOption} option Different option can be passed while subscribing.
     *  e.g. If topic has already emitted some value and then a subscriber comes, then it can pass option to re-emit last emitted value only for this new subscriber.
     *
     * @returns {Subscriber} Final subscriber object once successfully subscribed
     */
    subscribe(callback: (...args: any[]) => void, option: SubscribeOption): Subscriber;
    /**
     * Method to unsubscribe/remove a listener of this topic
     * @param {Subscriber} subscription Subscriber of this topic
     */
    unsubscribe(subscription: Subscriber): void;
    /**
     * Returns topic name
     *
     * @returns {string}
     */
    get topicName(): string;
    /**
     * Broadcast value to given subscriber
     * @param {Subscriber} subscriber
     */
    private emitValueToSubscriber;
}
