code: function setupMixin(classDef, mixin) {
    const propNames = Object.keys(mixin.properties || {});
  
    // Copy all properties from the mixin into the class definition,
    // unless they are already defined.
    propNames.forEach((name) => {
      if (!classDef['__' + name]) classDef['__' + name] = [];
      classDef['__' + name].push(mixin.properties[name]);
  
      // Make sure that this becomes a part of the properties definition of the class if the prop
      // isn't already defined.  used by the props array.
      if (!classDef.properties[name]) {
        // Object.assign would be nice, but IE11 doesn't yet support it, and don't need another polyfill
        classDef.properties[name] = Util.shallowClone(mixin.properties[name]);
      } else {
        if (mixin.properties[name].order !== undefined && classDef.properties[name].order === undefined) {
          classDef.properties[name].order = mixin.properties[name].order;
        }
        if ('value' in mixin.properties[name]) {
          classDef.properties[name].value = mixin.properties[name].value;
        }
  
        if ('type' in mixin.properties[name]) {
          classDef.properties[name].type = mixin.properties[name].type;
        }
  
        if (mixin.properties[name].propagateToChildren !== undefined &&
            classDef.properties[name].propagateToChildren === undefined) {
          classDef.properties[name].propagateToChildren = mixin.properties[name].propagateToChildren;
        }
      }
    });
  
    setupMethods(classDef, mixin.methods || {});
  }
docs: /*
  Provides a basic mixin mechanism.
  
  Provide an array of objects with a `properties` key and a `methods` key,
  and all property defintions and method defintions will be copied into your classDef UNLESS your classDef
  has provided its own definition.
  If your mixin provides a onCreated() method, it will be called after the classDef onCreated() method is called;
  this will be called for any number of mixins.
  
  If your mixin provides a property that is also defined by your component,
  
  @method setupMixin
  @param {Object} classDef
  @private