2021-02-21 17:44:27 +01:00

72 lines
2.7 KiB
JSON

{
"type": "File",
"start":0,"end":44,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
"errors": [
"SyntaxError: Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions. (2:2)"
],
"program": {
"type": "Program",
"start":0,"end":44,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
"sourceType": "module",
"interpreter": null,
"body": [
{
"type": "ClassDeclaration",
"start":0,"end":44,"loc":{"start":{"line":1,"column":0},"end":{"line":3,"column":1}},
"id": {
"type": "Identifier",
"start":6,"end":7,"loc":{"start":{"line":1,"column":6},"end":{"line":1,"column":7},"identifierName":"A"},
"name": "A"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start":8,"end":44,"loc":{"start":{"line":1,"column":8},"end":{"line":3,"column":1}},
"body": [
{
"type": "ClassMethod",
"start":12,"end":42,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":32}},
"static": false,
"key": {
"type": "StringLiteral",
"start":12,"end":25,"loc":{"start":{"line":2,"column":2},"end":{"line":2,"column":15}},
"extra": {
"rawValue": "constructor",
"raw": "\"constructor\""
},
"value": "constructor"
},
"computed": false,
"kind": "constructor",
"id": null,
"generator": false,
"async": false,
"params": [
{
"type": "Identifier",
"start":26,"end":38,"loc":{"start":{"line":2,"column":16},"end":{"line":2,"column":28},"identifierName":"this"},
"name": "this",
"typeAnnotation": {
"type": "TypeAnnotation",
"start":30,"end":38,"loc":{"start":{"line":2,"column":20},"end":{"line":2,"column":28}},
"typeAnnotation": {
"type": "StringTypeAnnotation",
"start":32,"end":38,"loc":{"start":{"line":2,"column":22},"end":{"line":2,"column":28}}
}
}
}
],
"body": {
"type": "BlockStatement",
"start":40,"end":42,"loc":{"start":{"line":2,"column":30},"end":{"line":2,"column":32}},
"body": [],
"directives": []
}
}
]
}
}
],
"directives": []
}
}