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

121 lines
2.7 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 15,
"end": 49,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 21,
"end": 22,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 15,
"end": 49,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 29,
"end": 47,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 29,
"end": 42,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 30,
"end": 41,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 30,
"end": 31,
"ctxt": 0
},
"value": "a",
"optional": false
},
"consequent": {
"type": "StringLiteral",
"span": {
"start": 34,
"end": 36,
"ctxt": 0
},
"value": "",
"raw": "\"\""
},
"alternate": {
"type": "StringLiteral",
"span": {
"start": 39,
"end": 41,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 29,
"end": 47,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 45,
"end": 47,
"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
}