UNPKG

kentico-cloud-delivery

Version:

Official Kentico Cloud Delivery SDK

22 lines 739 B
"use strict"; exports.__esModule = true; var models_1 = require("../models"); var ElementMapper = /** @class */ (function () { function ElementMapper() { } ElementMapper.prototype.mapElement = function (response) { if (!response) { throw Error("Invalid response for mapping element"); } return new models_1.Element({ codename: response.codename, name: response.name, type: response.type, options: response.options ? response.options : [], taxonomyGroup: response.taxonomy_group }); }; return ElementMapper; }()); exports.ElementMapper = ElementMapper; //# sourceMappingURL=element.mapper.js.map