mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
76 lines
2.9 KiB
JSON
76 lines
2.9 KiB
JSON
{
|
|
"type": "File",
|
|
"start":0,"end":44,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":44}},
|
|
"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,"index":0},"end":{"line":3,"column":1,"index":44}},
|
|
"sourceType": "module",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"start":0,"end":44,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":44}},
|
|
"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":44,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":3,"column":1,"index":44}},
|
|
"body": [
|
|
{
|
|
"type": "ClassMethod",
|
|
"start":12,"end":42,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":2,"column":32,"index":42}},
|
|
"static": false,
|
|
"key": {
|
|
"type": "StringLiteral",
|
|
"start":12,"end":25,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":2,"column":15,"index":25}},
|
|
"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,"index":26},"end":{"line":2,"column":28,"index":38},"identifierName":"this"},
|
|
"name": "this",
|
|
"typeAnnotation": {
|
|
"type": "TypeAnnotation",
|
|
"start":30,"end":38,"loc":{"start":{"line":2,"column":20,"index":30},"end":{"line":2,"column":28,"index":38}},
|
|
"typeAnnotation": {
|
|
"type": "StringTypeAnnotation",
|
|
"start":32,"end":38,"loc":{"start":{"line":2,"column":22,"index":32},"end":{"line":2,"column":28,"index":38}}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start":40,"end":42,"loc":{"start":{"line":2,"column":30,"index":40},"end":{"line":2,"column":32,"index":42}},
|
|
"body": [],
|
|
"directives": []
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"directives": [],
|
|
"extra": {
|
|
"topLevelAwait": false
|
|
}
|
|
}
|
|
}
|