Emit function param and return type annotations

This commit is contained in:
Joe Savona
2024-02-05 21:51:09 -08:00
parent 29cb62ad6c
commit 9ec9331def
2 changed files with 2 additions and 0 deletions
@@ -207,6 +207,7 @@ export function lower(
return Ok({
id,
params,
returnType: null, // TODO: extract the actual return type node if present
body: builder.build(),
context,
generator: func.node.generator === true,
@@ -233,6 +233,7 @@ export type HIRFunction = {
id: string | null;
env: Environment;
params: Array<Place | SpreadPattern>;
returnType: t.FlowType | t.TSType | null;
context: Array<Place>;
body: HIR;
generator: boolean;