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

85 lines
1.8 KiB
JSON

{
"type": "Script",
"span": {
"start": 134,
"end": 197,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 140,
"end": 141,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 134,
"end": 197,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 183,
"end": 195,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 183,
"end": 189,
"ctxt": 0
},
"value": "method",
"optional": true
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 183,
"end": 195,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 193,
"end": 195,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": true,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}