Add "Statement" as alias to Flow enum declaration (#11184)
This commit is contained in:
parent
d13fd7c7bd
commit
9c261aeafe
@ -468,7 +468,7 @@ defineType("VoidTypeAnnotation", {
|
|||||||
|
|
||||||
// Enums
|
// Enums
|
||||||
defineType("EnumDeclaration", {
|
defineType("EnumDeclaration", {
|
||||||
aliases: ["Declaration"],
|
aliases: ["Statement", "Declaration"],
|
||||||
visitor: ["id", "body"],
|
visitor: ["id", "body"],
|
||||||
fields: {
|
fields: {
|
||||||
id: validateType("Identifier"),
|
id: validateType("Identifier"),
|
||||||
|
|||||||
@ -3613,6 +3613,7 @@ export function isStatement(node: ?Object, opts?: Object): boolean {
|
|||||||
"InterfaceDeclaration" === nodeType ||
|
"InterfaceDeclaration" === nodeType ||
|
||||||
"OpaqueType" === nodeType ||
|
"OpaqueType" === nodeType ||
|
||||||
"TypeAlias" === nodeType ||
|
"TypeAlias" === nodeType ||
|
||||||
|
"EnumDeclaration" === nodeType ||
|
||||||
"TSDeclareFunction" === nodeType ||
|
"TSDeclareFunction" === nodeType ||
|
||||||
"TSInterfaceDeclaration" === nodeType ||
|
"TSInterfaceDeclaration" === nodeType ||
|
||||||
"TSTypeAliasDeclaration" === nodeType ||
|
"TSTypeAliasDeclaration" === nodeType ||
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user