mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Emit function param and return type annotations
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user