UNPKG

diffusion

Version:

Diffusion JavaScript client

50 lines (49 loc) 2.49 kB
"use strict"; /** * @module Services.TopicNotifications */ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); exports.TopicNotificationDeselectionSerialiser = exports.TopicNotificationDeselectionSerialiserClass = void 0; var conversation_id_serialiser_1 = require("./../../conversation/conversation-id-serialiser"); var serialiser_1 = require("./../../serialisers/serialiser"); var topic_selector_serialiser_1 = require("./../../topics/topic-selector-serialiser"); /** * Serialiser for {@link TopicNotificationDeselection} */ var TopicNotificationDeselectionSerialiserClass = /** @class */ (function (_super) { __extends(TopicNotificationDeselectionSerialiserClass, _super); function TopicNotificationDeselectionSerialiserClass() { return _super !== null && _super.apply(this, arguments) || this; } /** * Write a {@link TopicNotificationDeselection} to the stream * * @param bos the output stream * @param value the {@link TopicNotificationDeselection} to be written */ TopicNotificationDeselectionSerialiserClass.prototype.write = function (bos, value) { conversation_id_serialiser_1.CIDSerialiser.write(bos, value.cid); topic_selector_serialiser_1.TopicSelectorSerialiser.write(bos, value.selector); }; return TopicNotificationDeselectionSerialiserClass; }(serialiser_1.AbstractSerialiser)); exports.TopicNotificationDeselectionSerialiserClass = TopicNotificationDeselectionSerialiserClass; /** * The {@link TopicNotificationDeselectionSerialiser} singleton */ // eslint-disable-next-line @typescript-eslint/naming-convention exports.TopicNotificationDeselectionSerialiser = new TopicNotificationDeselectionSerialiserClass();