matssocket
Version:
MatsSocket client library
48 lines • 1.79 kB
TypeScript
/**
* Information about how a subscription went on the server side. If you do two subscriptions to the same Topic,
* you will still only get one such message - thus if you want one for each, you'd better add two listeners too,
* <i>before</i> doing any of the subscribes.
* <p />
* Note: this also fires upon every reconnect. <b>Make note of the {@link SubscriptionEventType#LOST_MESSAGES}!</b>
*
* @param type {SubscriptionEventType} - {@link SubscriptionEvent#type}
* @param topicId {string} - {@link SubscriptionEvent#topicId}
* @class
*/
export function SubscriptionEvent(type: SubscriptionEventType, topicId: string): void;
export class SubscriptionEvent {
/**
* Information about how a subscription went on the server side. If you do two subscriptions to the same Topic,
* you will still only get one such message - thus if you want one for each, you'd better add two listeners too,
* <i>before</i> doing any of the subscribes.
* <p />
* Note: this also fires upon every reconnect. <b>Make note of the {@link SubscriptionEventType#LOST_MESSAGES}!</b>
*
* @param type {SubscriptionEventType} - {@link SubscriptionEvent#type}
* @param topicId {string} - {@link SubscriptionEvent#topicId}
* @class
*/
constructor(type: SubscriptionEventType, topicId: string);
/**
* How the subscription fared.
*
* @type {SubscriptionEventType}
*/
type: SubscriptionEventType;
/**
* What TopicIc this relates to.
*
* @type {string}
*/
topicId: string;
}
/**
* *
*/
export type SubscriptionEventType = string;
export namespace SubscriptionEventType {
let OK: string;
let NOT_AUTHORIZED: string;
let LOST_MESSAGES: string;
}
//# sourceMappingURL=SubscriptionEvent.d.ts.map