Support Flow this parameter annotations (#12234)
This commit is contained in:
@@ -1118,6 +1118,7 @@ export interface FunctionTypeAnnotation extends BaseNode {
|
||||
params: Array<FunctionTypeParam>;
|
||||
rest?: FunctionTypeParam | null;
|
||||
returnType: FlowType;
|
||||
this?: FunctionTypeParam | null;
|
||||
}
|
||||
|
||||
export interface FunctionTypeParam extends BaseNode {
|
||||
|
||||
@@ -173,6 +173,7 @@ defineType("FunctionTypeAnnotation", {
|
||||
typeParameters: validateOptionalType("TypeParameterDeclaration"),
|
||||
params: validate(arrayOfType("FunctionTypeParam")),
|
||||
rest: validateOptionalType("FunctionTypeParam"),
|
||||
this: validateOptionalType("FunctionTypeParam"),
|
||||
returnType: validateType("FlowType"),
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user