Add "Statement" as alias to Flow enum declaration (#11184)

This commit is contained in:
George Zahariev 2020-02-28 00:24:25 -08:00 committed by GitHub
parent d13fd7c7bd
commit 9c261aeafe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -468,7 +468,7 @@ defineType("VoidTypeAnnotation", {
// Enums
defineType("EnumDeclaration", {
aliases: ["Declaration"],
aliases: ["Statement", "Declaration"],
visitor: ["id", "body"],
fields: {
id: validateType("Identifier"),

View File

@ -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 ||