Add an internal factory method utility for defining the type property on a model.
/** * A factory function that adds a `type` field to an Object * @param {Object} object The Object to add the `type` field to * @param {String} type The name of the type to add * @return {Object} Returns the original object */functionaddType(object,type){Object.defineProperty(object,`type`,{configurable: false,enumerable: true,get(){returntype;},});returnobject;}
Add an internal factory method utility for defining the
typeproperty on a model.