Files

59 lines
2.1 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: The `declare` modifier can only appear on class fields. (2:2)"
],
"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": "ClassMethod",
"start":12,"end":28,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":2,"column":18,"index":28}},
"declare": true,
"static": false,
"key": {
"type": "Identifier",
"start":20,"end":23,"loc":{"start":{"line":2,"column":10,"index":20},"end":{"line":2,"column":13,"index":23},"identifierName":"foo"},
"name": "foo"
},
"computed": false,
"kind": "method",
"id": null,
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start":26,"end":28,"loc":{"start":{"line":2,"column":16,"index":26},"end":{"line":2,"column":18,"index":28}},
"body": [],
"directives": []
}
}
]
}
}
],
"directives": [],
"extra": {
"topLevelAwait": false
}
}
}