Files

61 lines
2.2 KiB
JSON

{
"type": "File",
"start":0,"end":30,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":30}},
"errors": [
"SyntaxError: Initializers are not allowed in fields with the `declare` modifier. (2:17)"
],
"program": {
"type": "Program",
"start":0,"end":30,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":30}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ClassDeclaration",
"start":0,"end":30,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":30}},
"id": {
"type": "Identifier",
"start":6,"end":7,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":7,"index":7},"identifierName":"A"},
"name": "A"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start":8,"end":30,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":3,"column":1,"index":30}},
"body": [
{
"type": "ClassPrivateProperty",
"start":12,"end":28,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":2,"column":18,"index":28}},
"declare": true,
"static": false,
"variance": null,
"key": {
"type": "PrivateName",
"start":20,"end":24,"loc":{"start":{"line":2,"column":10,"index":20},"end":{"line":2,"column":14,"index":24}},
"id": {
"type": "Identifier",
"start":21,"end":24,"loc":{"start":{"line":2,"column":11,"index":21},"end":{"line":2,"column":14,"index":24},"identifierName":"foo"},
"name": "foo"
}
},
"value": {
"type": "NumericLiteral",
"start":27,"end":28,"loc":{"start":{"line":2,"column":17,"index":27},"end":{"line":2,"column":18,"index":28}},
"extra": {
"rawValue": 2,
"raw": "2"
},
"value": 2
}
}
]
}
}
],
"directives": [],
"extra": {
"topLevelAwait": false
}
}
}