UNPKG

@sitecore/sc-contenthub-webclient-sdk

Version:

Sitecore Content Hub WebClient SDK.

26 lines 1.06 kB
/* eslint-disable @typescript-eslint/no-redundant-type-constituents */ import Guard from "../../guard"; import { PropertyDataType } from "./data-type"; import { MemberBase } from "./member"; import { MemberDefinitionType } from "./member-definition-type"; export class PropertyBase extends MemberBase { constructor(name, typeInfo, hasDataSource = false) { super(name, MemberDefinitionType.Property); this.isMultiLanguage = false; Guard.notNullOrUndefined(typeInfo); this.dataType = typeInfo.type; this.isMultiValue = typeInfo.isArray; this.hasDataSource = hasDataSource; } /** * Returns a string representation of the current property instance. * * @remarks * Can not be used for serialization. Only useful during debugging or testing. * Returned format: \<member format ({@link MemberBase.toString})\> ({@link PropertyDataType}) */ toString() { return `${super.toString()} (${PropertyDataType[this.dataType]})`; } } //# sourceMappingURL=property.js.map