Support Flow's inline interface syntax (#7973)
* Support Flow's inline interface syntax * Fix babel-generator
This commit is contained in:
@@ -211,6 +211,15 @@ defineType("InterfaceExtends", {
|
||||
|
||||
defineInterfaceishType("InterfaceDeclaration");
|
||||
|
||||
defineType("InterfaceTypeAnnotation", {
|
||||
visitor: ["extends", "body"],
|
||||
aliases: ["Flow", "FlowType"],
|
||||
fields: {
|
||||
extends: validateOptional(arrayOfType("InterfaceExtends")),
|
||||
body: validateType("ObjectTypeAnnotation"),
|
||||
},
|
||||
});
|
||||
|
||||
defineType("IntersectionTypeAnnotation", {
|
||||
visitor: ["types"],
|
||||
aliases: ["Flow", "FlowType"],
|
||||
|
||||
Reference in New Issue
Block a user