Flow_ast.Function
module RestParam: { ... };
module Param: { ... };
module ThisParam: { ... };
module Params: { ... };
type t('M, 'T) = {
id: option(Identifier.t('M, 'T)),
params: Params.t('M, 'T),
body: body('M, 'T),
async: bool,
generator: bool,
predicate: option(Type.Predicate.t('M, 'T)),
return: Type.annotation_or_hint('M, 'T),
tparams: option(Type.TypeParams.t('M, 'T)),
comments: option(Syntax.t('M, unit)),
sig_loc: 'M,
};
and body('M, 'T) =
| BodyBlock(('M, Statement.Block.t('M, 'T)))
| BodyExpression(Expression.t('M, 'T))
;