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

121 lines
2.6 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 32,
"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": 32,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 14,
"end": 18,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 14,
"end": 15,
"ctxt": 0
},
"value": 0.0
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 14,
"end": 18,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 23,
"end": 30,
"ctxt": 0
},
"key": {
"type": "NumericLiteral",
"span": {
"start": 23,
"end": 24,
"ctxt": 0
},
"value": 1.0
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 23,
"end": 30,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 27,
"end": 30,
"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
}