add numericliteral
This commit is contained in:
parent
3a05513e31
commit
f56af90c20
@ -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);
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user