/// declare module goog.pubsub { class TopicId extends TopicId__Class { } /** Fake class which should be extended to avoid inheriting static properties */ class TopicId__Class { /** * A templated class that is used to register {@code goog.pubsub.PubSub} * subscribers. * * Typical usage for a publisher: * * /** @type {!goog.pubsub.TopicId.} * zorg.TopicId.STATE_CHANGE = new goog.pubsub.TopicId( * goog.events.getUniqueId('state-change')); * * // Compiler enforces that these types are correct. * pubSub.publish(zorg.TopicId.STATE_CHANGE, zorg.State.STARTED); * * * Typical usage for a subscriber: * * // Compiler enforces the callback parameter type. * pubSub.subscribe(zorg.TopicId.STATE_CHANGE, function(state) { * if (state == zorg.State.STARTED) { * // Handle STARTED state. * } * }); * * * @param {string} topicId * @template PAYLOAD * @constructor * @final * @struct */ constructor(topicId: string); } }