UNPKG

stackexchange-api

Version:
22 lines (21 loc) 1.06 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const Site_1 = require("./Site"); /** * The equivalent of [Type migration_info](https://api.stackexchange.com/docs/types/migration-info).<br> * This object represents a [[Question]]'s migration to or from a different [[Site]] in the [Stack Exchange network](https://stackexchange.com/sites). */ class MigrationInfo { constructor(migration_info) { var _a, _b, _c, _d, _e; this.onDate = (_b = (_a = migration_info) === null || _a === void 0 ? void 0 : _a.on_date, (_b !== null && _b !== void 0 ? _b : null)); if (typeof ((_c = migration_info) === null || _c === void 0 ? void 0 : _c.other_site) === 'undefined') { this.otherSite = null; } else { this.otherSite = new Site_1.Site(migration_info.other_site); } this.questionId = (_e = (_d = migration_info) === null || _d === void 0 ? void 0 : _d.question_id, (_e !== null && _e !== void 0 ? _e : null)); } } exports.MigrationInfo = MigrationInfo;