diff --git a/packages/babel-types/src/ast-types/generated/index.ts b/packages/babel-types/src/ast-types/generated/index.ts index 473e23de7e..ae461bbae0 100755 --- a/packages/babel-types/src/ast-types/generated/index.ts +++ b/packages/babel-types/src/ast-types/generated/index.ts @@ -821,6 +821,7 @@ export interface ExportAllDeclaration extends BaseNode { type: "ExportAllDeclaration"; source: StringLiteral; assertions?: ImportAttribute | null; + exportKind?: "type" | "value" | null; } export interface ExportDefaultDeclaration extends BaseNode { @@ -1225,6 +1226,7 @@ export interface ObjectTypeProperty extends BaseNode { value: FlowType; variance?: Variance | null; kind: "init" | "get" | "set"; + method: boolean; optional: boolean; proto: boolean; static: boolean; @@ -1335,19 +1337,19 @@ export interface EnumDeclaration extends BaseNode { export interface EnumBooleanBody extends BaseNode { type: "EnumBooleanBody"; members: Array; - explicit: boolean; + explicitType: boolean; } export interface EnumNumberBody extends BaseNode { type: "EnumNumberBody"; members: Array; - explicit: boolean; + explicitType: boolean; } export interface EnumStringBody extends BaseNode { type: "EnumStringBody"; members: Array; - explicit: boolean; + explicitType: boolean; } export interface EnumSymbolBody extends BaseNode { @@ -1542,6 +1544,7 @@ export interface ClassPrivateProperty extends BaseNode { value?: Expression | null; decorators?: Array | null; static: any; + typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null; } export interface ClassPrivateMethod extends BaseNode { diff --git a/packages/babel-types/src/definitions/core.ts b/packages/babel-types/src/definitions/core.ts index ace2ae9f9f..744c266b68 100644 --- a/packages/babel-types/src/definitions/core.ts +++ b/packages/babel-types/src/definitions/core.ts @@ -1399,6 +1399,7 @@ defineType("ExportAllDeclaration", { source: { validate: assertNodeType("StringLiteral"), }, + exportKind: validateOptional(assertOneOf("type", "value")), assertions: { optional: true, validate: chain( diff --git a/packages/babel-types/src/definitions/experimental.ts b/packages/babel-types/src/definitions/experimental.ts index 29e7ecdbe7..95be90585e 100644 --- a/packages/babel-types/src/definitions/experimental.ts +++ b/packages/babel-types/src/definitions/experimental.ts @@ -117,6 +117,10 @@ defineType("ClassPrivateProperty", { validate: assertNodeType("Expression"), optional: true, }, + typeAnnotation: { + validate: assertNodeType("TypeAnnotation", "TSTypeAnnotation", "Noop"), + optional: true, + }, decorators: { validate: chain( assertValueType("array"), diff --git a/packages/babel-types/src/definitions/flow.ts b/packages/babel-types/src/definitions/flow.ts index e475fff4d8..bb1015d18c 100644 --- a/packages/babel-types/src/definitions/flow.ts +++ b/packages/babel-types/src/definitions/flow.ts @@ -328,6 +328,7 @@ defineType("ObjectTypeProperty", { proto: validate(assertValueType("boolean")), optional: validate(assertValueType("boolean")), variance: validateOptionalType("Variance"), + method: validate(assertValueType("boolean")), }, }); @@ -488,7 +489,7 @@ defineType("EnumBooleanBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { - explicit: validate(assertValueType("boolean")), + explicitType: validate(assertValueType("boolean")), members: validateArrayOfType("EnumBooleanMember"), }, }); @@ -497,7 +498,7 @@ defineType("EnumNumberBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { - explicit: validate(assertValueType("boolean")), + explicitType: validate(assertValueType("boolean")), members: validateArrayOfType("EnumNumberMember"), }, }); @@ -506,7 +507,7 @@ defineType("EnumStringBody", { aliases: ["EnumBody"], visitor: ["members"], fields: { - explicit: validate(assertValueType("boolean")), + explicitType: validate(assertValueType("boolean")), members: validateArrayOfType(["EnumStringMember", "EnumDefaultedMember"]), }, });