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

131 lines
2.9 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
"end": 40,
"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": 40,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 14,
"end": 22,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 14,
"end": 19,
"ctxt": 0
},
"value": "foo",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 14,
"end": 22,
"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": 27,
"end": 38,
"ctxt": 0
},
"key": {
"type": "StringLiteral",
"span": {
"start": 27,
"end": 32,
"ctxt": 0
},
"value": "bar",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 27,
"end": 38,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 35,
"end": 38,
"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
}