add numericliteral
This commit is contained in:
@@ -478,7 +478,7 @@ defineType("ObjectMethod", {
|
||||
},
|
||||
key: {
|
||||
validate(node, key, val) {
|
||||
let expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral"];
|
||||
let expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"];
|
||||
assertNodeType(...expectedTypes)(node, key, val);
|
||||
}
|
||||
},
|
||||
@@ -510,7 +510,7 @@ defineType("ObjectProperty", {
|
||||
},
|
||||
key: {
|
||||
validate(node, key, val) {
|
||||
let expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral"];
|
||||
let expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"];
|
||||
assertNodeType(...expectedTypes)(node, key, val);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -254,7 +254,7 @@ defineType("ClassMethod", {
|
||||
},
|
||||
key: {
|
||||
validate(node, key, val) {
|
||||
let expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral"];
|
||||
let expectedTypes = node.computed ? ["Expression"] : ["Identifier", "StringLiteral", "NumericLiteral"];
|
||||
assertNodeType(...expectedTypes)(node, key, val);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user