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
|
||||
defineType("EnumDeclaration", {
|
||||
aliases: ["Declaration"],
|
||||
aliases: ["Statement", "Declaration"],
|
||||
visitor: ["id", "body"],
|
||||
fields: {
|
||||
id: validateType("Identifier"),
|
||||
|
||||
@ -3613,6 +3613,7 @@ export function isStatement(node: ?Object, opts?: Object): boolean {
|
||||
"InterfaceDeclaration" === nodeType ||
|
||||
"OpaqueType" === nodeType ||
|
||||
"TypeAlias" === nodeType ||
|
||||
"EnumDeclaration" === nodeType ||
|
||||
"TSDeclareFunction" === nodeType ||
|
||||
"TSInterfaceDeclaration" === nodeType ||
|
||||
"TSTypeAliasDeclaration" === nodeType ||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user