UNPKG

kentico-cloud-delivery

Version:

Official Kentico Cloud Delivery SDK

20 lines 976 B
"use strict"; exports.__esModule = true; var ContentItem = /** @class */ (function () { /** * Base class representing content item type. All content type models need to extend this class. * @constructor * @param {(fieldName: string) => string} propertyResolver - Callback used to bind fields returned from Kentico Cloud to a model property. Common usage is to bind e.g. 'FirstName' field from Kentico Cloud response to 'firstName' field in model * @param {(link: Link) => string} linkResolver - Callback used to resolve links or URL slug fields * @param {(contentItem: ContentItem) => string} richTextResolver - Callback used to resolve modular content in rich text fields to HTML */ function ContentItem(data) { this.data = data; if (data) { Object.assign(this, data); } } return ContentItem; }()); exports.ContentItem = ContentItem; //# sourceMappingURL=content-item.class.js.map