UNPKG

diffusion

Version:

Diffusion JavaScript client

50 lines (49 loc) 2.46 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.TopicNotificationSelectionSerialiser = exports.TopicNotificationSelectionSerialiserClass = 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 TopicNotificationSelection} */ var TopicNotificationSelectionSerialiserClass = /** @class */ (function (_super) { __extends(TopicNotificationSelectionSerialiserClass, _super); function TopicNotificationSelectionSerialiserClass() { return _super !== null && _super.apply(this, arguments) || this; } /** * Write a {@link TopicNotificationSelection} to the stream * * @param bos the output stream * @param value the {@link TopicNotificationSelection} to be written */ TopicNotificationSelectionSerialiserClass.prototype.write = function (bos, value) { conversation_id_serialiser_1.CIDSerialiser.write(bos, value.cid); topic_selector_serialiser_1.TopicSelectorSerialiser.write(bos, value.selector); }; return TopicNotificationSelectionSerialiserClass; }(serialiser_1.AbstractSerialiser)); exports.TopicNotificationSelectionSerialiserClass = TopicNotificationSelectionSerialiserClass; /** * The {@link TopicNotificationSelectionSerialiser} singleton */ // eslint-disable-next-line @typescript-eslint/naming-convention exports.TopicNotificationSelectionSerialiser = new TopicNotificationSelectionSerialiserClass();