From 1c91f6a8a551fe9fd7d48e66b1bfa8096c622775 Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Wed, 5 Jun 2024 10:54:12 +0200 Subject: [PATCH] fix: update authorChecklist --- .../javascript/authorChecklist/index.js | 285 ++++++++++-------- 1 file changed, 162 insertions(+), 123 deletions(-) diff --git a/.github/actions/javascript/authorChecklist/index.js b/.github/actions/javascript/authorChecklist/index.js index 73180a458dc9..d82a71bbab73 100644 --- a/.github/actions/javascript/authorChecklist/index.js +++ b/.github/actions/javascript/authorChecklist/index.js @@ -21146,7 +21146,8 @@ function TSMappedType(node) { nameType, optional, readonly, - typeParameter + typeParameter, + typeAnnotation } = node; this.tokenChar(123); this.space(); @@ -21172,9 +21173,11 @@ function TSMappedType(node) { tokenIfPlusMinus(this, optional); this.tokenChar(63); } - this.tokenChar(58); - this.space(); - this.print(node.typeAnnotation, node); + if (typeAnnotation) { + this.tokenChar(58); + this.space(); + this.print(typeAnnotation, node); + } this.space(); this.tokenChar(125); } @@ -22335,7 +22338,7 @@ class Printer { } this._printStack.push(node); const oldInAux = this._insideAux; - this._insideAux = node.loc == undefined; + this._insideAux = node.loc == null; this._maybeAddAuxComment(this._insideAux && !oldInAux); const parenthesized = (_node$extra = node.extra) == null ? void 0 : _node$extra.parenthesized; let shouldPrintParens = forceParens || parenthesized && format.retainFunctionParens && nodeType === "FunctionExpression" || needsParens(node, parent, this._printStack); @@ -22628,7 +22631,7 @@ class Printer { if (type === 0) { let offset = 0; if (i === 0) { - if (this._buf.hasContent() && (comment.type === "CommentLine" || commentStartLine != commentEndLine)) { + if (this._buf.hasContent() && (comment.type === "CommentLine" || commentStartLine !== commentEndLine)) { offset = leadingCommentNewline = 1; } } else { @@ -23857,10 +23860,7 @@ const NodeDescriptions = { VariableDeclarator: "variable declaration", YieldExpression: "yield expression" }; -const toNodeDescription = ({ - type, - prefix -}) => type === "UpdateExpression" ? NodeDescriptions.UpdateExpression[String(prefix)] : NodeDescriptions[type]; +const toNodeDescription = node => node.type === "UpdateExpression" ? NodeDescriptions.UpdateExpression[`${node.prefix}`] : NodeDescriptions[node.type]; var StandardErrors = { AccessorIsGenerator: ({ kind @@ -24071,6 +24071,7 @@ var StandardErrors = { UnterminatedRegExp: "Unterminated regular expression.", UnterminatedString: "Unterminated string constant.", UnterminatedTemplate: "Unterminated template.", + UsingDeclarationExport: "Using declaration cannot be exported.", UsingDeclarationHasBindingPattern: "Using declaration cannot have destructuring patterns.", VarRedeclaration: ({ identifierName @@ -24360,6 +24361,10 @@ var estree = superClass => class ESTreeParserMixin extends superClass { } return this.finishNode(node, "MethodDefinition"); } + nameIsConstructor(key) { + if (key.type === "Literal") return key.value === "constructor"; + return super.nameIsConstructor(key); + } parseClassProperty(...args) { const propertyNode = super.parseClassProperty(...args); { @@ -24424,9 +24429,9 @@ var estree = superClass => class ESTreeParserMixin extends superClass { } } toAssignableObjectExpressionProp(prop, isLast, isLHS) { - if (prop.kind === "get" || prop.kind === "set") { + if (prop.type === "Property" && (prop.kind === "get" || prop.kind === "set")) { this.raise(Errors.PatternHasAccessor, prop.key); - } else if (prop.method) { + } else if (prop.type === "Property" && prop.method) { this.raise(Errors.PatternHasMethod, prop.key); } else { super.toAssignableObjectExpressionProp(prop, isLast, isLHS); @@ -24438,9 +24443,9 @@ var estree = superClass => class ESTreeParserMixin extends superClass { node.type = "ImportExpression"; node.source = node.arguments[0]; if (this.hasPlugin("importAttributes") || this.hasPlugin("importAssertions")) { - var _node$arguments$, _node$arguments$2; - node.options = (_node$arguments$ = node.arguments[1]) != null ? _node$arguments$ : null; - node.attributes = (_node$arguments$2 = node.arguments[1]) != null ? _node$arguments$2 : null; + var _ref, _ref2; + node.options = (_ref = node.arguments[1]) != null ? _ref : null; + node.attributes = (_ref2 = node.arguments[1]) != null ? _ref2 : null; } delete node.arguments; delete node.callee; @@ -24512,7 +24517,7 @@ var estree = superClass => class ESTreeParserMixin extends superClass { return node.type === "Property" && node.kind === "init" && !node.method; } isObjectMethod(node) { - return node.method || node.kind === "get" || node.kind === "set"; + return node.type === "Property" && (node.method || node.kind === "get" || node.kind === "set"); } finishNodeAt(node, type, endLoc) { return toESTreeLocation(super.finishNodeAt(node, type, endLoc)); @@ -25415,7 +25420,9 @@ class CommentsParser extends BaseParser { const { commentsLen } = this.state; - if (this.comments.length != commentsLen) this.comments.length = commentsLen; + if (this.comments.length !== commentsLen) { + this.comments.length = commentsLen; + } this.comments.push(comment); this.state.commentsLen++; } @@ -28589,50 +28596,56 @@ var flow = superClass => class FlowParserMixin extends superClass { this.state.noAnonFunctionType = oldNoAnonFunctionType; return type; case 47: - node.typeParameters = this.flowParseTypeParameterDeclaration(); - this.expect(10); - tmp = this.flowParseFunctionTypeParams(); - node.params = tmp.params; - node.rest = tmp.rest; - node.this = tmp._this; - this.expect(11); - this.expect(19); - node.returnType = this.flowParseType(); - return this.finishNode(node, "FunctionTypeAnnotation"); + { + const node = this.startNode(); + node.typeParameters = this.flowParseTypeParameterDeclaration(); + this.expect(10); + tmp = this.flowParseFunctionTypeParams(); + node.params = tmp.params; + node.rest = tmp.rest; + node.this = tmp._this; + this.expect(11); + this.expect(19); + node.returnType = this.flowParseType(); + return this.finishNode(node, "FunctionTypeAnnotation"); + } case 10: - this.next(); - if (!this.match(11) && !this.match(21)) { - if (tokenIsIdentifier(this.state.type) || this.match(78)) { - const token = this.lookahead().type; - isGroupedType = token !== 17 && token !== 14; - } else { - isGroupedType = true; + { + const node = this.startNode(); + this.next(); + if (!this.match(11) && !this.match(21)) { + if (tokenIsIdentifier(this.state.type) || this.match(78)) { + const token = this.lookahead().type; + isGroupedType = token !== 17 && token !== 14; + } else { + isGroupedType = true; + } } - } - if (isGroupedType) { - this.state.noAnonFunctionType = false; - type = this.flowParseType(); - this.state.noAnonFunctionType = oldNoAnonFunctionType; - if (this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19)) { - this.expect(11); - return type; + if (isGroupedType) { + this.state.noAnonFunctionType = false; + type = this.flowParseType(); + this.state.noAnonFunctionType = oldNoAnonFunctionType; + if (this.state.noAnonFunctionType || !(this.match(12) || this.match(11) && this.lookahead().type === 19)) { + this.expect(11); + return type; + } else { + this.eat(12); + } + } + if (type) { + tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); } else { - this.eat(12); + tmp = this.flowParseFunctionTypeParams(); } + node.params = tmp.params; + node.rest = tmp.rest; + node.this = tmp._this; + this.expect(11); + this.expect(19); + node.returnType = this.flowParseType(); + node.typeParameters = null; + return this.finishNode(node, "FunctionTypeAnnotation"); } - if (type) { - tmp = this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(type)]); - } else { - tmp = this.flowParseFunctionTypeParams(); - } - node.params = tmp.params; - node.rest = tmp.rest; - node.this = tmp._this; - this.expect(11); - this.expect(19); - node.returnType = this.flowParseType(); - node.typeParameters = null; - return this.finishNode(node, "FunctionTypeAnnotation"); case 133: return this.parseLiteral(this.state.value, "StringLiteralTypeAnnotation"); case 85: @@ -28948,7 +28961,7 @@ var flow = superClass => class FlowParserMixin extends superClass { const arrows = []; while (stack.length !== 0) { const node = stack.pop(); - if (node.type === "ArrowFunctionExpression") { + if (node.type === "ArrowFunctionExpression" && node.body.type !== "BlockStatement") { if (node.typeParameters || !node.returnType) { this.finishArrowValidation(node); } else { @@ -28985,18 +28998,18 @@ var flow = superClass => class FlowParserMixin extends superClass { return result; } parseParenItem(node, startLoc) { - node = super.parseParenItem(node, startLoc); + const newNode = super.parseParenItem(node, startLoc); if (this.eat(17)) { - node.optional = true; + newNode.optional = true; this.resetEndLocation(node); } if (this.match(14)) { const typeCastNode = this.startNodeAt(startLoc); - typeCastNode.expression = node; + typeCastNode.expression = newNode; typeCastNode.typeAnnotation = this.flowParseTypeAnnotation(); return this.finishNode(typeCastNode, "TypeCastExpression"); } - return node; + return newNode; } assertModuleNodeAllowed(node) { if (node.type === "ImportDeclaration" && (node.importKind === "type" || node.importKind === "typeof") || node.type === "ExportNamedDeclaration" && node.exportKind === "type" || node.type === "ExportAllDeclaration" && node.exportKind === "type") { @@ -30369,7 +30382,7 @@ var jsx = superClass => class JSXParserMixin extends superClass { } else { let count = 0; let semi = false; - while (count++ < 10 && this.state.pos < this.length && !(semi = this.codePointAtPos(this.state.pos) == 59)) { + while (count++ < 10 && this.state.pos < this.length && !(semi = this.codePointAtPos(this.state.pos) === 59)) { ++this.state.pos; } if (semi) { @@ -30531,7 +30544,7 @@ var jsx = superClass => class JSXParserMixin extends superClass { children.push(this.jsxParseElementAt(startLoc)); break; case 141: - children.push(this.parseExprAtom()); + children.push(this.parseLiteral(this.state.value, "JSXText")); break; case 5: { @@ -30588,9 +30601,7 @@ var jsx = superClass => class JSXParserMixin extends superClass { context[context.length - 1] = newContext; } parseExprAtom(refExpressionErrors) { - if (this.match(141)) { - return this.parseLiteral(this.state.value, "JSXText"); - } else if (this.match(142)) { + if (this.match(142)) { return this.jsxParseElement(); } else if (this.match(47) && this.input.charCodeAt(this.state.pos) !== 33) { this.replaceToken(142); @@ -30671,14 +30682,14 @@ class TypeScriptScopeHandler extends ScopeHandler { return new TypeScriptScope(flags); } enter(flags) { - if (flags == 256) { + if (flags === 256) { this.importsStack.push(new Set()); } super.enter(flags); } exit() { const flags = super.exit(); - if (flags == 256) { + if (flags === 256) { this.importsStack.pop(); } return flags; @@ -30987,14 +30998,15 @@ class LValParser extends NodeUtils { return this.finishNode(prop, "RestElement"); } parseBindingProperty() { - const prop = this.startNode(); const { type, startLoc } = this.state; if (type === 21) { - return this.parseBindingRestProperty(prop); - } else if (type === 138) { + return this.parseBindingRestProperty(this.startNode()); + } + const prop = this.startNode(); + if (type === 138) { this.expectPlugin("destructuringPrivate", startLoc); this.classScope.usePrivateName(this.state.value, startLoc); prop.key = this.parsePrivateName(); @@ -32844,13 +32856,14 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass { parseExport(node, decorators) { if (this.match(83)) { this.next(); + const nodeImportEquals = node; let maybeDefaultIdentifier = null; if (this.isContextual(130) && this.isPotentialImportPhase(false)) { - maybeDefaultIdentifier = this.parseMaybeImportPhase(node, false); + maybeDefaultIdentifier = this.parseMaybeImportPhase(nodeImportEquals, false); } else { - node.importKind = "value"; + nodeImportEquals.importKind = "value"; } - return this.tsParseImportEqualsDeclaration(node, maybeDefaultIdentifier, true); + return this.tsParseImportEqualsDeclaration(nodeImportEquals, maybeDefaultIdentifier, true); } else if (this.eat(29)) { const assign = node; assign.expression = super.parseExpression(); @@ -33022,9 +33035,9 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass { return result.node; } parseParenItem(node, startLoc) { - node = super.parseParenItem(node, startLoc); + const newNode = super.parseParenItem(node, startLoc); if (this.eat(17)) { - node.optional = true; + newNode.optional = true; this.resetEndLocation(node); } if (this.match(14)) { @@ -33133,7 +33146,9 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass { } declareClassPrivateMethodInScope(node, kind) { if (node.type === "TSDeclareMethod") return; - if (node.type === "MethodDefinition" && !node.value.body) return; + if (node.type === "MethodDefinition" && !hasOwnProperty.call(node.value, "body")) { + return; + } super.declareClassPrivateMethodInScope(node, kind); } parseClassSuper(node) { @@ -33685,9 +33700,12 @@ var placeholders = superClass => class PlaceholdersParserMixin extends superClas } } finishPlaceholder(node, expectedNode) { - const isFinished = !!(node.expectedNode && node.type === "Placeholder"); - node.expectedNode = expectedNode; - return isFinished ? node : this.finishNode(node, "Placeholder"); + let placeholder = node; + if (!placeholder.expectedNode || !placeholder.type) { + placeholder = this.finishNode(placeholder, "Placeholder"); + } + placeholder.expectedNode = expectedNode; + return placeholder; } getTokenFromCode(code) { if (code === 37 && this.input.charCodeAt(this.state.pos + 1) === 37) { @@ -33747,8 +33765,9 @@ var placeholders = superClass => class PlaceholdersParserMixin extends superClas return this.finishNode(stmt, "LabeledStatement"); } this.semicolon(); - node.name = expr.name; - return this.finishPlaceholder(node, "Statement"); + const stmtPlaceholder = node; + stmtPlaceholder.name = expr.name; + return this.finishPlaceholder(stmtPlaceholder, "Statement"); } parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse) { return this.parsePlaceholder("BlockStatement") || super.parseBlock(allowDirectives, createNewLexicalScope, afterBlockParse); @@ -33781,17 +33800,18 @@ var placeholders = superClass => class PlaceholdersParserMixin extends superClas parseExport(node, decorators) { const placeholder = this.parsePlaceholder("Identifier"); if (!placeholder) return super.parseExport(node, decorators); + const node2 = node; if (!this.isContextual(98) && !this.match(12)) { - node.specifiers = []; - node.source = null; - node.declaration = this.finishPlaceholder(placeholder, "Declaration"); - return this.finishNode(node, "ExportNamedDeclaration"); + node2.specifiers = []; + node2.source = null; + node2.declaration = this.finishPlaceholder(placeholder, "Declaration"); + return this.finishNode(node2, "ExportNamedDeclaration"); } this.expectPlugin("exportDefaultFrom"); const specifier = this.startNode(); specifier.exported = placeholder; - node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; - return super.parseExport(node, decorators); + node2.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")]; + return super.parseExport(node2, decorators); } isExportDefaultSpecifier() { if (this.match(65)) { @@ -35091,14 +35111,16 @@ class ExpressionParser extends LValParser { } parseTemplate(isTagged) { const node = this.startNode(); - node.expressions = []; let curElt = this.parseTemplateElement(isTagged); - node.quasis = [curElt]; + const quasis = [curElt]; + const substitutions = []; while (!curElt.tail) { - node.expressions.push(this.parseTemplateSubstitution()); + substitutions.push(this.parseTemplateSubstitution()); this.readTemplateContinuation(); - node.quasis.push(curElt = this.parseTemplateElement(isTagged)); + quasis.push(curElt = this.parseTemplateElement(isTagged)); } + node.expressions = substitutions; + node.quasis = quasis; return this.finishNode(node, "TemplateLiteral"); } parseTemplateSubstitution() { @@ -35186,8 +35208,11 @@ class ExpressionParser extends LValParser { let isGenerator = this.eat(55); this.parsePropertyNamePrefixOperator(prop); const containsEsc = this.state.containsEsc; - const key = this.parsePropertyName(prop, refExpressionErrors); + this.parsePropertyName(prop, refExpressionErrors); if (!isGenerator && !containsEsc && this.maybeAsyncOrAccessorProp(prop)) { + const { + key + } = prop; const keyName = key.name; if (keyName === "async" && !this.hasPrecedingLineBreak()) { isAsync = true; @@ -35322,7 +35347,6 @@ class ExpressionParser extends LValParser { prop.computed = false; } } - return prop.key; } initFunction(node, isAsync) { node.id = null; @@ -36645,9 +36669,9 @@ class StatementParser extends ExpressionParser { this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, { kind: "destructuring" }); - } else if (kind === "const" && !(this.match(58) || this.isContextual(102))) { + } else if ((kind === "const" || kind === "using" || kind === "await using") && !(this.match(58) || this.isContextual(102))) { this.raise(Errors.DeclarationMissingInitializer, this.state.lastTokEndLoc, { - kind: "const" + kind }); } } @@ -36732,8 +36756,11 @@ class StatementParser extends ExpressionParser { isClassMethod() { return this.match(10); } + nameIsConstructor(key) { + return key.type === "Identifier" && key.name === "constructor" || key.type === "StringLiteral" && key.value === "constructor"; + } isNonstaticConstructor(method) { - return !method.computed && !method.static && (method.key.name === "constructor" || method.key.value === "constructor"); + return !method.computed && !method.static && this.nameIsConstructor(method.key); } parseClassBody(hadSuperClass, oldStrict) { this.classScope.enter(); @@ -36835,9 +36862,10 @@ class StatementParser extends ExpressionParser { this.pushClassMethod(classBody, publicMethod, true, false, false, false); return; } - const isContextual = tokenIsIdentifier(this.state.type) && !this.state.containsEsc; - const isPrivate = this.match(138); + const isContextual = !this.state.containsEsc && tokenIsIdentifier(this.state.type); const key = this.parseClassElementName(member); + const maybeContextualKw = isContextual ? key.name : null; + const isPrivate = this.isPrivateName(key); const maybeQuestionTokenStartLoc = this.state.startLoc; this.parsePostMemberNameModifiers(publicMember); if (this.isClassMethod()) { @@ -36866,7 +36894,7 @@ class StatementParser extends ExpressionParser { } else { this.pushClassProperty(classBody, publicProp); } - } else if (isContextual && key.name === "async" && !this.isLineTerminator()) { + } else if (maybeContextualKw === "async" && !this.isLineTerminator()) { this.resetPreviousNodeTrailingComments(key); const isGenerator = this.eat(55); if (publicMember.optional) { @@ -36884,9 +36912,9 @@ class StatementParser extends ExpressionParser { } this.pushClassMethod(classBody, publicMethod, isGenerator, true, false, false); } - } else if (isContextual && (key.name === "get" || key.name === "set") && !(this.match(55) && this.isLineTerminator())) { + } else if ((maybeContextualKw === "get" || maybeContextualKw === "set") && !(this.match(55) && this.isLineTerminator())) { this.resetPreviousNodeTrailingComments(key); - method.kind = key.name; + method.kind = maybeContextualKw; const isPrivate = this.match(138); this.parseClassElementName(publicMethod); if (isPrivate) { @@ -36898,7 +36926,7 @@ class StatementParser extends ExpressionParser { this.pushClassMethod(classBody, publicMethod, false, false, false, false); } this.checkGetterSetterParams(publicMethod); - } else if (isContextual && key.name === "accessor" && !this.isLineTerminator()) { + } else if (maybeContextualKw === "accessor" && !this.isLineTerminator()) { this.expectPlugin("decoratorAutoAccessors"); this.resetPreviousNodeTrailingComments(key); const isPrivate = this.match(138); @@ -36930,7 +36958,8 @@ class StatementParser extends ExpressionParser { member.key = key; return key; } - return this.parsePropertyName(member); + this.parsePropertyName(member); + return member.key; } parseClassStaticBlock(classBody, member) { var _member$decorators; @@ -36949,7 +36978,7 @@ class StatementParser extends ExpressionParser { } } pushClassProperty(classBody, prop) { - if (!prop.computed && (prop.key.name === "constructor" || prop.key.value === "constructor")) { + if (!prop.computed && this.nameIsConstructor(prop.key)) { this.raise(Errors.ConstructorClassField, prop.key); } classBody.body.push(this.parseClassProperty(prop)); @@ -36960,11 +36989,8 @@ class StatementParser extends ExpressionParser { this.classScope.declarePrivateName(this.getPrivateNameSV(node.key), 0, node.key.loc.start); } pushClassAccessorProperty(classBody, prop, isPrivate) { - if (!isPrivate && !prop.computed) { - const key = prop.key; - if (key.name === "constructor" || key.value === "constructor") { - this.raise(Errors.ConstructorClassField, key); - } + if (!isPrivate && !prop.computed && this.nameIsConstructor(prop.key)) { + this.raise(Errors.ConstructorClassField, prop.key); } const node = this.parseClassAccessorProperty(prop); classBody.body.push(node); @@ -37100,7 +37126,8 @@ class StatementParser extends ExpressionParser { } maybeParseExportNamespaceSpecifier(node) { if (this.isContextual(93)) { - if (!node.specifiers) node.specifiers = []; + var _ref, _ref$specifiers; + (_ref$specifiers = (_ref = node).specifiers) != null ? _ref$specifiers : _ref.specifiers = []; const specifier = this.startNodeAt(this.state.lastTokStartLoc); this.next(); specifier.exported = this.parseModuleExportName(); @@ -37111,13 +37138,14 @@ class StatementParser extends ExpressionParser { } maybeParseExportNamedSpecifiers(node) { if (this.match(5)) { - if (!node.specifiers) node.specifiers = []; - const isTypeExport = node.exportKind === "type"; - node.specifiers.push(...this.parseExportSpecifiers(isTypeExport)); - node.source = null; - node.declaration = null; + const node2 = node; + if (!node2.specifiers) node2.specifiers = []; + const isTypeExport = node2.exportKind === "type"; + node2.specifiers.push(...this.parseExportSpecifiers(isTypeExport)); + node2.source = null; + node2.declaration = null; if (this.hasPlugin("importAssertions")) { - node.assertions = []; + node2.assertions = []; } return true; } @@ -37228,6 +37256,14 @@ class StatementParser extends ExpressionParser { return true; } } + if (this.isContextual(107)) { + this.raise(Errors.UsingDeclarationExport, this.state.startLoc); + return true; + } + if (this.isContextual(96) && this.startsAwaitUsing()) { + this.raise(Errors.UsingDeclarationExport, this.state.startLoc); + return true; + } return type === 74 || type === 75 || type === 68 || type === 80 || this.isLet() || this.isAsyncFunction(); } checkExport(node, checkNames, isDefault, isFrom) { @@ -37265,12 +37301,15 @@ class StatementParser extends ExpressionParser { } } } else if (node.declaration) { - if (node.declaration.type === "FunctionDeclaration" || node.declaration.type === "ClassDeclaration") { - const id = node.declaration.id; + const decl = node.declaration; + if (decl.type === "FunctionDeclaration" || decl.type === "ClassDeclaration") { + const { + id + } = decl; if (!id) throw new Error("Assertion failure"); this.checkDuplicateExports(node, id.name); - } else if (node.declaration.type === "VariableDeclaration") { - for (const declaration of node.declaration.declarations) { + } else if (decl.type === "VariableDeclaration") { + for (const declaration of decl.declarations) { this.checkDeclaration(declaration.id); } } @@ -49871,7 +49910,7 @@ defineType("CallExpression", { validate: (0, _utils.assertNodeType)("Expression", "Super", "V8IntrinsicIdentifier") }, arguments: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "ArgumentPlaceholder"))) } }, !process.env.BABEL_TYPES_8_BREAKING ? { optional: { @@ -51258,7 +51297,7 @@ defineType("OptionalCallExpression", { validate: (0, _utils.assertNodeType)("Expression") }, arguments: { - validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "JSXNamespacedName", "ArgumentPlaceholder"))) + validate: (0, _utils.chain)((0, _utils.assertValueType)("array"), (0, _utils.assertEach)((0, _utils.assertNodeType)("Expression", "SpreadElement", "ArgumentPlaceholder"))) }, optional: { validate: !process.env.BABEL_TYPES_8_BREAKING ? (0, _utils.assertValueType)("boolean") : (0, _utils.chain)((0, _utils.assertValueType)("boolean"), (0, _utils.assertOptionalChainStart)())