function resolveTypeAlias()

in src/rule-generated-flow-types.js [272:282]


function resolveTypeAlias(genericType, typeAliasMap) {
  let currentType = genericType;
  while (
    currentType != null &&
    currentType.type === 'GenericTypeAnnotation' &&
    typeAliasMap[currentType.id.name] != null
  ) {
    currentType = typeAliasMap[currentType.id.name];
  }
  return currentType;
}