Commit b807a4c1 authored by Wolfgang Knopki's avatar Wolfgang Knopki
Browse files

Merge branch 'revert-jul13' into 'testing'

Revert "Merge branch 'MLAB-677' into 'testing'"

See merge request !168
parents 81e73777 08d3a3ba
Pipeline #6895 passed with stage
in 16 seconds
This diff is collapsed.
{
"name": "@babel/parser",
"version": "7.18.6",
"version": "7.18.8",
"description": "A JavaScript parser",
"author": "The Babel Team (https://babel.dev/team)",
"homepage": "https://babel.dev/docs/en/next/babel-parser",
......
......@@ -939,7 +939,7 @@ function classAccessorProperty(key, value = null, typeAnnotation = null, decorat
});
}
function classPrivateProperty(key, value = null, decorators = null, _static) {
function classPrivateProperty(key, value = null, decorators = null, _static = false) {
return (0, _validateNode.default)({
type: "ClassPrivateProperty",
key,
......
......@@ -9,8 +9,12 @@ var _generated = require("../generated");
var _removeTypeDuplicates = require("../../modifications/typescript/removeTypeDuplicates");
var _index = require("../../validators/generated/index");
function createTSUnionType(typeAnnotations) {
const types = typeAnnotations.map(type => type.typeAnnotation);
const types = typeAnnotations.map(type => {
return (0, _index.isTSTypeAnnotation)(type) ? type.typeAnnotation : type;
});
const flattened = (0, _removeTypeDuplicates.default)(types);
if (flattened.length === 1) {
......
......@@ -278,7 +278,8 @@ defineType("ForStatement", {
}
}
});
const functionCommon = {
const functionCommon = () => ({
params: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement")))
},
......@@ -288,9 +289,11 @@ const functionCommon = {
async: {
default: false
}
};
});
exports.functionCommon = functionCommon;
const functionTypeAnnotationCommon = {
const functionTypeAnnotationCommon = () => ({
returnType: {
validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
optional: true
......@@ -299,9 +302,11 @@ const functionTypeAnnotationCommon = {
validate: (0, _utils.assertNodeType)("TypeParameterDeclaration", "TSTypeParameterDeclaration", "Noop"),
optional: true
}
};
});
exports.functionTypeAnnotationCommon = functionTypeAnnotationCommon;
const functionDeclarationCommon = Object.assign({}, functionCommon, {
const functionDeclarationCommon = () => Object.assign({}, functionCommon(), {
declare: {
validate: (0, _utils.assertValueType)("boolean"),
optional: true
......@@ -311,11 +316,12 @@ const functionDeclarationCommon = Object.assign({}, functionCommon, {
optional: true
}
});
exports.functionDeclarationCommon = functionDeclarationCommon;
defineType("FunctionDeclaration", {
builder: ["id", "params", "body", "generator", "async"],
visitor: ["id", "params", "body", "returnType", "typeParameters"],
fields: Object.assign({}, functionDeclarationCommon, functionTypeAnnotationCommon, {
fields: Object.assign({}, functionDeclarationCommon(), functionTypeAnnotationCommon(), {
body: {
validate: (0, _utils.assertNodeType)("BlockStatement")
},
......@@ -338,7 +344,7 @@ defineType("FunctionDeclaration", {
defineType("FunctionExpression", {
inherits: "FunctionDeclaration",
aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
fields: Object.assign({}, functionCommon(), functionTypeAnnotationCommon(), {
id: {
validate: (0, _utils.assertNodeType)("Identifier"),
optional: true
......@@ -352,21 +358,24 @@ defineType("FunctionExpression", {
}
})
});
const patternLikeCommon = {
const patternLikeCommon = () => ({
typeAnnotation: {
validate: (0, _utils.assertNodeType)("TypeAnnotation", "TSTypeAnnotation", "Noop"),
optional: true
},
decorators: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator")))
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
optional: true
}
};
});
exports.patternLikeCommon = patternLikeCommon;
defineType("Identifier", {
builder: ["name"],
visitor: ["typeAnnotation", "decorators"],
aliases: ["Expression", "PatternLike", "LVal", "TSEntityName"],
fields: Object.assign({}, patternLikeCommon, {
fields: Object.assign({}, patternLikeCommon(), {
name: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("string"), Object.assign(function (node, key, val) {
if (!process.env.BABEL_TYPES_8_BREAKING) return;
......@@ -587,7 +596,7 @@ defineType("ObjectExpression", {
});
defineType("ObjectMethod", {
builder: ["kind", "key", "params", "body", "computed", "generator", "async"],
fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
fields: Object.assign({}, functionCommon(), functionTypeAnnotationCommon(), {
kind: Object.assign({
validate: (0, _utils.assertOneOf)("method", "get", "set")
}, !process.env.BABEL_TYPES_8_BREAKING ? {
......@@ -598,7 +607,7 @@ defineType("ObjectMethod", {
},
key: {
validate: function () {
const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral");
const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral");
const computed = (0, _utils.assertNodeType)("Expression");
const validator = function (node, key, val) {
......@@ -606,7 +615,7 @@ defineType("ObjectMethod", {
validator(node, key, val);
};
validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral"];
validator.oneOfNodeTypes = ["Expression", "Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral"];
return validator;
}()
},
......@@ -683,7 +692,7 @@ defineType("RestElement", {
builder: ["argument"],
aliases: ["LVal", "PatternLike"],
deprecatedAlias: "RestProperty",
fields: Object.assign({}, patternLikeCommon, {
fields: Object.assign({}, patternLikeCommon(), {
argument: {
validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertNodeType)("LVal") : (0, _utils.assertNodeType)("Identifier", "ArrayPattern", "ObjectPattern", "MemberExpression", "TSAsExpression", "TSTypeAssertion", "TSNonNullExpression")
},
......@@ -910,7 +919,7 @@ defineType("AssignmentPattern", {
visitor: ["left", "right", "decorators"],
builder: ["left", "right"],
aliases: ["Pattern", "PatternLike", "LVal"],
fields: Object.assign({}, patternLikeCommon, {
fields: Object.assign({}, patternLikeCommon(), {
left: {
validate: (0, _utils.assertNodeType)("Identifier", "ObjectPattern", "ArrayPattern", "MemberExpression", "TSAsExpression", "TSTypeAssertion", "TSNonNullExpression")
},
......@@ -927,7 +936,7 @@ defineType("ArrayPattern", {
visitor: ["elements", "typeAnnotation"],
builder: ["elements"],
aliases: ["Pattern", "PatternLike", "LVal"],
fields: Object.assign({}, patternLikeCommon, {
fields: Object.assign({}, patternLikeCommon(), {
elements: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeOrValueType)("null", "PatternLike")))
},
......@@ -945,7 +954,7 @@ defineType("ArrowFunctionExpression", {
builder: ["params", "body", "async"],
visitor: ["params", "body", "returnType", "typeParameters"],
aliases: ["Scopable", "Function", "BlockParent", "FunctionParent", "Expression", "Pureish"],
fields: Object.assign({}, functionCommon, functionTypeAnnotationCommon, {
fields: Object.assign({}, functionCommon(), functionTypeAnnotationCommon(), {
expression: {
validate: (0, _utils.assertValueType)("boolean")
},
......@@ -1267,7 +1276,8 @@ defineType("MetaProperty", {
}
}
});
const classMethodOrPropertyCommon = {
const classMethodOrPropertyCommon = () => ({
abstract: {
validate: (0, _utils.assertValueType)("boolean"),
optional: true
......@@ -1297,11 +1307,13 @@ const classMethodOrPropertyCommon = {
const validator = node.computed ? computed : normal;
validator(node, key, val);
};
}(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression"))
}(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "Expression"))
}
};
});
exports.classMethodOrPropertyCommon = classMethodOrPropertyCommon;
const classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, classMethodOrPropertyCommon, {
const classMethodOrDeclareMethodCommon = () => Object.assign({}, functionCommon(), classMethodOrPropertyCommon(), {
params: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Identifier", "Pattern", "RestElement", "TSParameterProperty")))
},
......@@ -1318,12 +1330,13 @@ const classMethodOrDeclareMethodCommon = Object.assign({}, functionCommon, class
optional: true
}
});
exports.classMethodOrDeclareMethodCommon = classMethodOrDeclareMethodCommon;
defineType("ClassMethod", {
aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method"],
builder: ["kind", "key", "params", "body", "computed", "static", "generator", "async"],
visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
fields: Object.assign({}, classMethodOrDeclareMethodCommon(), functionTypeAnnotationCommon(), {
body: {
validate: (0, _utils.assertNodeType)("BlockStatement")
}
......@@ -1333,7 +1346,7 @@ defineType("ObjectPattern", {
visitor: ["properties", "typeAnnotation", "decorators"],
builder: ["properties"],
aliases: ["Pattern", "PatternLike", "LVal"],
fields: Object.assign({}, patternLikeCommon, {
fields: Object.assign({}, patternLikeCommon(), {
properties: {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("RestElement", "ObjectProperty")))
}
......@@ -1515,7 +1528,7 @@ defineType("ClassProperty", {
visitor: ["key", "value", "typeAnnotation", "decorators"],
builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
aliases: ["Property"],
fields: Object.assign({}, classMethodOrPropertyCommon, {
fields: Object.assign({}, classMethodOrPropertyCommon(), {
value: {
validate: (0, _utils.assertNodeType)("Expression"),
optional: true
......@@ -1550,16 +1563,16 @@ defineType("ClassAccessorProperty", {
visitor: ["key", "value", "typeAnnotation", "decorators"],
builder: ["key", "value", "typeAnnotation", "decorators", "computed", "static"],
aliases: ["Property", "Accessor"],
fields: Object.assign({}, classMethodOrPropertyCommon, {
fields: Object.assign({}, classMethodOrPropertyCommon(), {
key: {
validate: (0, _utils.chain)(function () {
const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "PrivateName");
const normal = (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "PrivateName");
const computed = (0, _utils.assertNodeType)("Expression");
return function (node, key, val) {
const validator = node.computed ? computed : normal;
validator(node, key, val);
};
}(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "Expression", "PrivateName"))
}(), (0, _utils.assertNodeType)("Identifier", "StringLiteral", "NumericLiteral", "BigIntLiteral", "Expression", "PrivateName"))
},
value: {
validate: (0, _utils.assertNodeType)("Expression"),
......@@ -1611,6 +1624,10 @@ defineType("ClassPrivateProperty", {
validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Decorator"))),
optional: true
},
static: {
validate: (0, _utils.assertValueType)("boolean"),
default: false
},
readonly: {
validate: (0, _utils.assertValueType)("boolean"),
optional: true
......@@ -1629,7 +1646,11 @@ defineType("ClassPrivateMethod", {
builder: ["kind", "key", "params", "body", "static"],
visitor: ["key", "params", "body", "decorators", "returnType", "typeParameters"],
aliases: ["Function", "Scopable", "BlockParent", "FunctionParent", "Method", "Private"],
fields: Object.assign({}, classMethodOrDeclareMethodCommon, functionTypeAnnotationCommon, {
fields: Object.assign({}, classMethodOrDeclareMethodCommon(), functionTypeAnnotationCommon(), {
kind: {
validate: (0, _utils.assertOneOf)("get", "set", "method"),
default: "method"
},
key: {
validate: (0, _utils.assertNodeType)("PrivateName")
},
......
......@@ -8,7 +8,8 @@ var _is = require("../validators/is");
const defineType = (0, _utils.defineAliasedType)("TypeScript");
const bool = (0, _utils.assertValueType)("boolean");
const tSFunctionTypeAnnotationCommon = {
const tSFunctionTypeAnnotationCommon = () => ({
returnType: {
validate: (0, _utils.assertNodeType)("TSTypeAnnotation", "Noop"),
optional: true
......@@ -17,7 +18,8 @@ const tSFunctionTypeAnnotationCommon = {
validate: (0, _utils.assertNodeType)("TSTypeParameterDeclaration", "Noop"),
optional: true
}
};
});
defineType("TSParameterProperty", {
aliases: ["LVal"],
visitor: ["parameter"],
......@@ -46,11 +48,11 @@ defineType("TSParameterProperty", {
defineType("TSDeclareFunction", {
aliases: ["Statement", "Declaration"],
visitor: ["id", "typeParameters", "params", "returnType"],
fields: Object.assign({}, _core.functionDeclarationCommon, tSFunctionTypeAnnotationCommon)
fields: Object.assign({}, (0, _core.functionDeclarationCommon)(), tSFunctionTypeAnnotationCommon())
});
defineType("TSDeclareMethod", {
visitor: ["decorators", "key", "typeParameters", "params", "returnType"],
fields: Object.assign({}, _core.classMethodOrDeclareMethodCommon, tSFunctionTypeAnnotationCommon)
fields: Object.assign({}, (0, _core.classMethodOrDeclareMethodCommon)(), tSFunctionTypeAnnotationCommon())
});
defineType("TSQualifiedName", {
aliases: ["TSEntityName"],
......@@ -60,27 +62,33 @@ defineType("TSQualifiedName", {
right: (0, _utils.validateType)("Identifier")
}
});
const signatureDeclarationCommon = {
const signatureDeclarationCommon = () => ({
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterDeclaration"),
["parameters"]: (0, _utils.validateArrayOfType)(["Identifier", "RestElement"]),
["typeAnnotation"]: (0, _utils.validateOptionalType)("TSTypeAnnotation")
};
});
const callConstructSignatureDeclaration = {
aliases: ["TSTypeElement"],
visitor: ["typeParameters", "parameters", "typeAnnotation"],
fields: signatureDeclarationCommon
fields: signatureDeclarationCommon()
};
defineType("TSCallSignatureDeclaration", callConstructSignatureDeclaration);
defineType("TSConstructSignatureDeclaration", callConstructSignatureDeclaration);
const namedTypeElementCommon = {
const namedTypeElementCommon = () => ({
key: (0, _utils.validateType)("Expression"),
computed: (0, _utils.validate)(bool),
computed: {
default: false
},
optional: (0, _utils.validateOptional)(bool)
};
});
defineType("TSPropertySignature", {
aliases: ["TSTypeElement"],
visitor: ["key", "typeAnnotation", "initializer"],
fields: Object.assign({}, namedTypeElementCommon, {
fields: Object.assign({}, namedTypeElementCommon(), {
readonly: (0, _utils.validateOptional)(bool),
typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"),
initializer: (0, _utils.validateOptionalType)("Expression"),
......@@ -92,7 +100,7 @@ defineType("TSPropertySignature", {
defineType("TSMethodSignature", {
aliases: ["TSTypeElement"],
visitor: ["key", "typeParameters", "parameters", "typeAnnotation"],
fields: Object.assign({}, signatureDeclarationCommon, namedTypeElementCommon, {
fields: Object.assign({}, signatureDeclarationCommon(), namedTypeElementCommon(), {
kind: {
validate: (0, _utils.assertOneOf)("method", "get", "set")
}
......@@ -128,10 +136,10 @@ const fnOrCtrBase = {
visitor: ["typeParameters", "parameters", "typeAnnotation"]
};
defineType("TSFunctionType", Object.assign({}, fnOrCtrBase, {
fields: signatureDeclarationCommon
fields: signatureDeclarationCommon()
}));
defineType("TSConstructorType", Object.assign({}, fnOrCtrBase, {
fields: Object.assign({}, signatureDeclarationCommon, {
fields: Object.assign({}, signatureDeclarationCommon(), {
abstract: (0, _utils.validateOptional)(bool)
})
}));
......
......@@ -269,7 +269,7 @@ export interface ObjectExpression extends BaseNode {
export interface ObjectMethod extends BaseNode {
type: "ObjectMethod";
kind: "method" | "get" | "set";
key: Expression | Identifier | StringLiteral | NumericLiteral;
key: Expression | Identifier | StringLiteral | NumericLiteral | BigIntLiteral;
params: Array<Identifier | Pattern | RestElement>;
body: BlockStatement;
computed: boolean;
......@@ -510,7 +510,7 @@ export interface MetaProperty extends BaseNode {
export interface ClassMethod extends BaseNode {
type: "ClassMethod";
kind: "get" | "set" | "method" | "constructor";
key: Identifier | StringLiteral | NumericLiteral | Expression;
key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression;
params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
body: BlockStatement;
computed: boolean;
......@@ -606,7 +606,7 @@ export interface OptionalCallExpression extends BaseNode {
export interface ClassProperty extends BaseNode {
type: "ClassProperty";
key: Identifier | StringLiteral | NumericLiteral | Expression;
key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression;
value: Expression | null;
typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
decorators: Array<Decorator> | null;
......@@ -624,7 +624,7 @@ export interface ClassProperty extends BaseNode {
export interface ClassAccessorProperty extends BaseNode {
type: "ClassAccessorProperty";
key: Identifier | StringLiteral | NumericLiteral | Expression | PrivateName;
key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression | PrivateName;
value: Expression | null;
typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
decorators: Array<Decorator> | null;
......@@ -645,7 +645,7 @@ export interface ClassPrivateProperty extends BaseNode {
key: PrivateName;
value: Expression | null;
decorators: Array<Decorator> | null;
static: any;
static: boolean;
definite: boolean | null;
readonly: boolean | null;
typeAnnotation: TypeAnnotation | TSTypeAnnotation | Noop | null;
......@@ -654,7 +654,7 @@ export interface ClassPrivateProperty extends BaseNode {
export interface ClassPrivateMethod extends BaseNode {
type: "ClassPrivateMethod";
kind: "get" | "set" | "method" | "constructor";
kind: "get" | "set" | "method";
key: PrivateName;
params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
body: BlockStatement;
......@@ -1268,7 +1268,7 @@ export interface TSDeclareFunction extends BaseNode {
export interface TSDeclareMethod extends BaseNode {
type: "TSDeclareMethod";
decorators: Array<Decorator> | null;
key: Identifier | StringLiteral | NumericLiteral | Expression;
key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression;
typeParameters: TSTypeParameterDeclaration | Noop | null;
params: Array<Identifier | Pattern | RestElement | TSParameterProperty>;
returnType: TSTypeAnnotation | Noop | null;
......@@ -1309,7 +1309,7 @@ export interface TSPropertySignature extends BaseNode {
key: Expression;
typeAnnotation: TSTypeAnnotation | null;
initializer: Expression | null;
computed: boolean | null;
computed: boolean;
kind: "get" | "set";
optional: boolean | null;
readonly: boolean | null;
......@@ -1321,7 +1321,7 @@ export interface TSMethodSignature extends BaseNode {
typeParameters: TSTypeParameterDeclaration | null;
parameters: Array<Identifier | RestElement>;
typeAnnotation: TSTypeAnnotation | null;
computed: boolean | null;
computed: boolean;
kind: "method" | "get" | "set";
optional: boolean | null;
}
......@@ -1799,7 +1799,7 @@ export function memberExpression(object: Expression, property: Expression | Iden
export function newExpression(callee: Expression | V8IntrinsicIdentifier, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>): NewExpression;
export function program(body: Array<Statement>, directives?: Array<Directive>, sourceType?: "script" | "module", interpreter?: InterpreterDirective | null): Program;
export function objectExpression(properties: Array<ObjectMethod | ObjectProperty | SpreadElement>): ObjectExpression;
export function objectMethod(kind: "method" | "get" | "set" | undefined, key: Expression | Identifier | StringLiteral | NumericLiteral, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, computed?: boolean, generator?: boolean, async?: boolean): ObjectMethod;
export function objectMethod(kind: "method" | "get" | "set" | undefined, key: Expression | Identifier | StringLiteral | NumericLiteral | BigIntLiteral, params: Array<Identifier | Pattern | RestElement>, body: BlockStatement, computed?: boolean, generator?: boolean, async?: boolean): ObjectMethod;
export function objectProperty(key: Expression | Identifier | StringLiteral | NumericLiteral | BigIntLiteral | DecimalLiteral | PrivateName, value: Expression | PatternLike, computed?: boolean, shorthand?: boolean, decorators?: Array<Decorator> | null): ObjectProperty;
export function restElement(argument: LVal): RestElement;
export function returnStatement(argument?: Expression | null): ReturnStatement;
......@@ -1832,7 +1832,7 @@ export function importDefaultSpecifier(local: Identifier): ImportDefaultSpecifie
export function importNamespaceSpecifier(local: Identifier): ImportNamespaceSpecifier;
export function importSpecifier(local: Identifier, imported: Identifier | StringLiteral): ImportSpecifier;
export function metaProperty(meta: Identifier, property: Identifier): MetaProperty;
export function classMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, computed?: boolean, _static?: boolean, generator?: boolean, async?: boolean): ClassMethod;
export function classMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, computed?: boolean, _static?: boolean, generator?: boolean, async?: boolean): ClassMethod;
export function objectPattern(properties: Array<RestElement | ObjectProperty>): ObjectPattern;
export function spreadElement(argument: Expression): SpreadElement;
declare function _super(): Super;
......@@ -1848,10 +1848,10 @@ export function bigIntLiteral(value: string): BigIntLiteral;
export function exportNamespaceSpecifier(exported: Identifier): ExportNamespaceSpecifier;
export function optionalMemberExpression(object: Expression, property: Expression | Identifier, computed: boolean | undefined, optional: boolean): OptionalMemberExpression;
export function optionalCallExpression(callee: Expression, _arguments: Array<Expression | SpreadElement | JSXNamespacedName | ArgumentPlaceholder>, optional: boolean): OptionalCallExpression;
export function classProperty(key: Identifier | StringLiteral | NumericLiteral | Expression, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassProperty;
export function classAccessorProperty(key: Identifier | StringLiteral | NumericLiteral | Expression | PrivateName, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassAccessorProperty;
export function classPrivateProperty(key: PrivateName, value: Expression | null | undefined, decorators: Array<Decorator> | null | undefined, _static: any): ClassPrivateProperty;
export function classPrivateMethod(kind: "get" | "set" | "method" | "constructor" | undefined, key: PrivateName, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, _static?: boolean): ClassPrivateMethod;
export function classProperty(key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassProperty;
export function classAccessorProperty(key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression | PrivateName, value?: Expression | null, typeAnnotation?: TypeAnnotation | TSTypeAnnotation | Noop | null, decorators?: Array<Decorator> | null, computed?: boolean, _static?: boolean): ClassAccessorProperty;
export function classPrivateProperty(key: PrivateName, value?: Expression | null, decorators?: Array<Decorator> | null, _static?: boolean): ClassPrivateProperty;
export function classPrivateMethod(kind: "get" | "set" | "method" | undefined, key: PrivateName, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, body: BlockStatement, _static?: boolean): ClassPrivateMethod;
export function privateName(id: Identifier): PrivateName;
export function staticBlock(body: Array<Statement>): StaticBlock;
export function anyTypeAnnotation(): AnyTypeAnnotation;
......@@ -1953,7 +1953,7 @@ export function pipelineBareFunction(callee: Expression): PipelineBareFunction;
export function pipelinePrimaryTopicReference(): PipelinePrimaryTopicReference;
export function tsParameterProperty(parameter: Identifier | AssignmentPattern): TSParameterProperty;
export function tsDeclareFunction(id: Identifier | null | undefined, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement>, returnType?: TSTypeAnnotation | Noop | null): TSDeclareFunction;
export function tsDeclareMethod(decorators: Array<Decorator> | null | undefined, key: Identifier | StringLiteral | NumericLiteral | Expression, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, returnType?: TSTypeAnnotation | Noop | null): TSDeclareMethod;
export function tsDeclareMethod(decorators: Array<Decorator> | null | undefined, key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | Expression, typeParameters: TSTypeParameterDeclaration | Noop | null | undefined, params: Array<Identifier | Pattern | RestElement | TSParameterProperty>, returnType?: TSTypeAnnotation | Noop | null): TSDeclareMethod;
export function tsQualifiedName(left: TSEntityName, right: Identifier): TSQualifiedName;
export function tsCallSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSCallSignatureDeclaration;
export function tsConstructSignatureDeclaration(typeParameters: TSTypeParameterDeclaration | null | undefined, parameters: Array<Identifier | RestElement>, typeAnnotation?: TSTypeAnnotation | null): TSConstructSignatureDeclaration;
......
......@@ -135,8 +135,8 @@ interface FunctionDeclaration extends BaseNode {
id?: Identifier | null;
params: Array<Identifier | Pattern | RestElement>;
body: BlockStatement;
generator?: boolean;
async?: boolean;
generator: boolean;
async: boolean;
declare?: boolean | null;
predicate?: DeclaredPredicate | InferredPredicate | null;
returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null;
......@@ -147,8 +147,8 @@ interface FunctionExpression extends BaseNode {
id?: Identifier | null;
params: Array<Identifier | Pattern | RestElement>;
body: BlockStatement;
generator?: boolean;
async?: boolean;
generator: boolean;
async: boolean;
predicate?: DeclaredPredicate | InferredPredicate | null;
returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null;
typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
......@@ -242,12 +242,12 @@ interface ObjectExpression extends BaseNode {
interface ObjectMethod extends BaseNode {
type: "ObjectMethod";
kind: "method" | "get" | "set";
key: Expression | Identifier | StringLiteral | NumericLiteral;
key: Expression | Identifier | StringLiteral | NumericLiteral | BigIntLiteral;
params: Array<Identifier | Pattern | RestElement>;
body: BlockStatement;
computed: boolean;
generator?: boolean;
async?: boolean;
generator: boolean;
async: boolean;
decorators?: Array<Decorator> | null;
returnType?: TypeAnnotation | TSTypeAnnotation | Noop | null;
typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | Noop | null;
......@@ -364,7 +364,7 @@ interface ArrowFunctionExpression extends BaseNode {
type: "ArrowFunctionExpression";
params: Array<Identifier | Pattern | RestElement>;
body: BlockStatement | Expression;
async?: boolean;
async: boolean;
expression: boolean;
generator?: boolean;
predicate?: DeclaredPredicate | InferredPredicate | null;
......@@ -459,14 +459,14 @@ interface MetaProperty extends BaseNode {
}
interface ClassMethod extends BaseNode {