swc/crates/swc_ecma_parser/tests/tsc/classExpression2.json

104 lines
2.2 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 42,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 7,
"end": 8,
"ctxt": 0
},
"value": "D",
"optional": false
},
"declare": false,
"span": {
"start": 1,
"end": 12,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 13,
"end": 42,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 17,
"end": 41,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 17,
"end": 18,
"ctxt": 0
},
"value": "v",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ClassExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 27,
"end": 28,
"ctxt": 0
},
"value": "C",
"optional": false
},
"span": {
"start": 21,
"end": 41,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": {
"type": "Identifier",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"value": "D",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
"definite": false
}
]
}
],
"interpreter": null
}