function findTypesThatChangedKind(oldSchema, newSchema) {
  var oldTypeMap = oldSchema.getTypeMap();
  var newTypeMap = newSchema.getTypeMap();

  var breakingChanges = [];
  Object.keys(oldTypeMap).forEach(function (typeName) {
    if (!newTypeMap[typeName]) {
      return;
    }
    var oldType = oldTypeMap[typeName];
    var newType = newTypeMap[typeName];
    if (!(oldType instanceof newType.constructor)) {
      breakingChanges.push({
        type: BreakingChangeType.TYPE_CHANGED_KIND,
        description: typeName + ' changed from ' + (typeKindName(oldType) + ' to ' + typeKindName(newType) + '.')
      });
    }
  });
  return breakingChanges;
}
/**
 * Given two schemas, returns an Array containing descriptions of any breaking
 * changes in the newSchema related to changing the type of a type.
 */
Given two schemas, returns an Array containing descriptions of any breaking
changes in the newSchema related to changing the type of a type.
Given two schemas returns an Array containing descriptions of any breaking changes in the newSchema related to changing the type of a type .
function findTypesThatChangedKind(oldSchema, newSchema) {
  var oldTypeMap = oldSchema.getTypeMap();
  var newTypeMap = newSchema.getTypeMap();
  var breakingChanges = [];
  Object.keys(oldTypeMap).forEach(function (typeName) {
    if (!newTypeMap[typeName]) {
      return;
    }
    var oldType = oldTypeMap[typeName];
    var newType = newTypeMap[typeName];
    if (!(oldType instanceof newType.constructor)) {
      breakingChanges.push({
        type: BreakingChangeType.TYPE_CHANGED_KIND,
        description: typeName + ' changed from ' + (typeKindName(oldType) + ' to ' + typeKindName(newType) + '.')
      });
    }
  });
  return breakingChanges;
}
function findTypesThatChangedKind ( oldSchema , newSchema ) { var oldTypeMap = oldSchema . getTypeMap ( ) ; var newTypeMap = newSchema . getTypeMap ( ) ; var breakingChanges = [ ] ; Object . keys ( oldTypeMap ) . forEach ( function ( typeName ) { if ( ! newTypeMap [ typeName ] ) { return ; } var oldType = oldTypeMap [ typeName ] ; var newType = newTypeMap [ typeName ] ; if ( ! ( oldType instanceof newType . constructor ) ) { breakingChanges . push ( { type : BreakingChangeType . TYPE_CHANGED_KIND , description : typeName + ' changed from ' + ( typeKindName ( oldType ) + ' to ' + typeKindName ( newType ) + '.' ) } ) ; } } ) ; return breakingChanges ; }
Given two schemas, returns an Array containing descriptions of any breaking
 changes in the newSchema related to changing the type of a type.
Given two schemas returns an Array containing descriptions of any breaking changes in the newSchema related to changing the type of a type .