[Babel 8] Remove optional field from MemberExpression (#13407)

This commit is contained in:
Daniel Tschinder 2021-06-03 16:08:34 +02:00 committed by GitHub
parent 92bca21011
commit 176bc24312
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -99,8 +99,6 @@ export default declare(api => {
t.memberExpression(
t.cloneNode(receiverLVal),
node.callee.property,
false,
false,
),
),
...argsInitializers,
@ -114,8 +112,6 @@ export default declare(api => {
t.memberExpression(
t.cloneNode(functionLVal),
t.identifier("call"),
false,
false,
),
[t.cloneNode(receiverLVal), ...args],
),

View File

@ -641,7 +641,12 @@ defineType("LogicalExpression", {
});
defineType("MemberExpression", {
builder: ["object", "property", "computed", "optional"],
builder: [
"object",
"property",
"computed",
...(!process.env.BABEL_TYPES_8_BREAKING ? ["optional"] : []),
],
visitor: ["object", "property"],
aliases: ["Expression", "LVal"],
fields: {