UNPKG

stackexchange-api

Version:
22 lines (21 loc) 1.62 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * The equivalent of [Type tag](https://api.stackexchange.com/docs/types/tag).<br> * This object represents a Tag on a [Stack Exchange site](https://stackexchange.com/sites).<br> * Applications should be prepared for the destruction of Tags, though this tends to be a rare event. */ class Tag { constructor(tag) { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r; this.count = (_b = (_a = tag) === null || _a === void 0 ? void 0 : _a.count, (_b !== null && _b !== void 0 ? _b : null)); this.hasSynonyms = (_d = (_c = tag) === null || _c === void 0 ? void 0 : _c.has_synonyms, (_d !== null && _d !== void 0 ? _d : null)); this.isModeratorOnly = (_f = (_e = tag) === null || _e === void 0 ? void 0 : _e.is_moderator_only, (_f !== null && _f !== void 0 ? _f : null)); this.isRequired = (_h = (_g = tag) === null || _g === void 0 ? void 0 : _g.is_required, (_h !== null && _h !== void 0 ? _h : null)); this.lastActivityDate = (_k = (_j = tag) === null || _j === void 0 ? void 0 : _j.last_activity_date, (_k !== null && _k !== void 0 ? _k : null)); this.name = (_m = (_l = tag) === null || _l === void 0 ? void 0 : _l.name, (_m !== null && _m !== void 0 ? _m : null)); this.synonyms = (_p = (_o = tag) === null || _o === void 0 ? void 0 : _o.synonyms, (_p !== null && _p !== void 0 ? _p : null)); this.userId = (_r = (_q = tag) === null || _q === void 0 ? void 0 : _q.user_id, (_r !== null && _r !== void 0 ? _r : null)); } } exports.Tag = Tag;