Skip to content

Commit

Permalink
Add "Statement" as alias to Flow enum declaration (#11184)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkz committed Feb 28, 2020
1 parent d13fd7c commit 9c261ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/babel-types/src/definitions/flow.js
Expand Up @@ -468,7 +468,7 @@ defineType("VoidTypeAnnotation", {

// Enums
defineType("EnumDeclaration", {
aliases: ["Declaration"],
aliases: ["Statement", "Declaration"],
visitor: ["id", "body"],
fields: {
id: validateType("Identifier"),
Expand Down
1 change: 1 addition & 0 deletions packages/babel-types/src/validators/generated/index.js
Expand Up @@ -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 ||
Expand Down

0 comments on commit 9c261ae

Please sign in to comment.