/** * A utility function to define a property on a class which must always be an instance of a certain class. Note that the private property (`#propName`) must be defined on the class first. * @param {Object} object The object to define the property on * @param {String} propName The name of the property to define on the object * @param {Function} ItemModel The class to use for this property. Every time this property is set, this model will be instantiated. * @return {Object} Returns the original object with the new property added */staticdefineModelProp(object,propName,ItemModel){Object.defineProperty(object,propName,{configurable: true,enumerable: true,get(){returnthis[`#${propName}`];},set(val){this[`#${propName}`]=newItemModel(val);},});}