UNPKG

@omnia/fx-models

Version:
27 lines (26 loc) 1.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PropertyValue = exports.PropertyValueBinding = void 0; class PropertyValueBinding { constructor(//definition: { new(): TPropertyDefinition ;}, propertyBinding, value) { this.value = value; //let defId = new definition().id; this.propertyBindingId = propertyBinding.bindingId; //let bindingDefId = this.propertyBindingId = (propertyBinding as PropertyBinding<any>).propertyDefinitionId //if (defId !== (propertyBinding as PropertyBinding<any>).propertyDefinitionId) { // throw new Error('The binding wih id: ' + this.propertyBindingId + ' does not belong to the specifed definition id: ' + defId + ' binding definition id: ' + bindingDefId); //} } } exports.PropertyValueBinding = PropertyValueBinding; class PropertyValue { containValue(other) { return JSON.stringify(other) == JSON.stringify(this); } appendValue(other) { //Replace to the new value if the property isn't a term set property return this; } } exports.PropertyValue = PropertyValue;