code: function _compareTypes(typeA, typeB, sameTypes, propertyA, propertyB) {
    sameTypes = sameTypes || {}
    if (typeA === typeB) {
      if (typeA === types.class && propertyA && propertyB) {
        return propertyA.constructor.name === propertyB.constructor.name;
      }
      return true;
    }
  
    if (Object.keys(sameTypes).length === 0) {
      return false;
    }
    let typeKeyA;
    let typeKeyB;
    let foundMatch = false
    Object.keys(sameTypes).forEach((key) => {
      if (foundMatch) { return }
      const similar = sameTypes[key];
      if (similar.indexOf(typeA) > -1) {
        typeKeyA = key;
      }
      if (similar.indexOf(typeB) > -1) {
        typeKeyB = key;
      }
      if (typeKeyA && typeKeyB) { foundMatch = true }
    });
    return foundMatch && typeKeyA === typeKeyB;
  }
docs: /* * * * * * *
  Helpers
  * * * * *