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

107 lines
2.3 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
"end": 42,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 6,
"end": 7,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 0,
"end": 42,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 13,
"end": 27,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 13,
"end": 24,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [],
"body": null,
"accessibility": null,
"isOptional": false
},
{
"type": "ClassMethod",
"span": {
"start": 31,
"end": 40,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 31,
"end": 34,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 31,
"end": 40,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 37,
"end": 40,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}