src/utils/getMethodDocumentation.js
function getMethodReturnDoc(methodPath) {
  const functionExpression = methodPath.get('value');

  if (functionExpression.node.returnType) {
    const returnType = getTypeAnnotation(functionExpression.get('returnType'));
    if (returnType && t.Flow.check(returnType.node)) {
      return { type: getFlowType(returnType) };
    } else if (returnType) {
      return { type: getTSType(returnType) };
    }
  }

  return null;
}
function getMethodReturnDoc(methodPath) {
  const functionExpression = methodPath.get('value');

  if (functionExpression.node.returnType) {
    const returnType = getTypeAnnotation(functionExpression.get('returnType'));
    if (returnType && t.Flow.check(returnType.node)) {
      return { type: getFlowType(returnType) };
    } else if (returnType) {
      return { type: getTSType(returnType) };
    }
  }

  return null;
}
function getMethodReturnDoc ( methodPath ) { const functionExpression = methodPath . get ( 'value' ) ; if ( functionExpression . node . returnType ) { const returnType = getTypeAnnotation ( functionExpression . get ( 'returnType' ) ) ; if ( returnType && t . Flow . check ( returnType . node ) ) { return { type : getFlowType ( returnType ) } ; } else if ( returnType ) { return { type : getTSType ( returnType ) } ; } } return null ; }
Extract flow return type.
Extract flow return type .