function describeTypes(mergedTypes, suggestedType = '') {
  const types = Object.keys(mergedTypes);
  const maxTypeLength = [...types].sort((t1, t2) => t2.length - t1.length)[0].length;

  return types
    .map((type, index) => {
      const description = mergedTypes[type];

      return describe({ index, type, suggestedType, description, maxTypeLength });
    })
    .join('\n');
}
/**
 * generate type descriptions
 *
 * @param {Object} mergedTypes
 * @returns {string} type descriptions
 */
generate type descriptions
@param {Object} mergedTypes
@returns {string} type descriptions
generate type descriptions @param { Object } mergedTypes @returns { string } type descriptions
function describeTypes(mergedTypes, suggestedType = '') {
  const types = Object.keys(mergedTypes);
  const maxTypeLength = [...types].sort((t1, t2) => t2.length - t1.length)[0].length;
  return types
    .map((type, index) => {
      const description = mergedTypes[type];
      return describe({ index, type, suggestedType, description, maxTypeLength });
    })
    .join('\n');
}
function describeTypes ( mergedTypes , suggestedType = '' ) { const types = Object . keys ( mergedTypes ) ; const maxTypeLength = [ ... types ] . sort ( ( t1 , t2 ) => t2 . length - t1 . length ) [ 0 ] . length ; return types . map ( ( type , index ) => { const description = mergedTypes [ type ] ; return describe ( { index , type , suggestedType , description , maxTypeLength } ) ; } ) . join ( '\n' ) ; }
generate type descriptions
 @param {Object} mergedTypes
 @returns {string} type descriptions
generate type descriptions @param { Object } mergedTypes @returns { string } type descriptions