diff --git a/compiler/packages/babel-plugin-react-forget/src/HIR/BuildHIR.ts b/compiler/packages/babel-plugin-react-forget/src/HIR/BuildHIR.ts index ae526f94f6..413a41aa36 100644 --- a/compiler/packages/babel-plugin-react-forget/src/HIR/BuildHIR.ts +++ b/compiler/packages/babel-plugin-react-forget/src/HIR/BuildHIR.ts @@ -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, diff --git a/compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts b/compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts index c2dc19eab4..009053754d 100644 --- a/compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts +++ b/compiler/packages/babel-plugin-react-forget/src/HIR/HIR.ts @@ -233,6 +233,7 @@ export type HIRFunction = { id: string | null; env: Environment; params: Array; + returnType: t.FlowType | t.TSType | null; context: Array; body: HIR; generator: boolean;