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

85 lines
1.8 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 135,
"end": 198,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 141,
"end": 142,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 135,
"end": 198,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 184,
"end": 196,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 184,
"end": 190,
"ctxt": 0
},
"value": "method",
"optional": true
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 184,
"end": 196,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 194,
"end": 196,
"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
}