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

223 lines
5.4 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 37,
"end": 130,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 43,
"end": 44,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 37,
"end": 130,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 51,
"end": 92,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 55,
"end": 75,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 56,
"end": 74,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 56,
"end": 62,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 63,
"end": 74,
"ctxt": 0
},
"value": "toPrimitive",
"optional": false
}
}
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 51,
"end": 92,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 78,
"end": 92,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 80,
"end": 90,
"ctxt": 0
},
"argument": {
"type": "StringLiteral",
"span": {
"start": 87,
"end": 89,
"ctxt": 0
},
"value": "",
"raw": "\"\""
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "getter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassMethod",
"span": {
"start": 97,
"end": 128,
"ctxt": 0
},
"key": {
"type": "Computed",
"span": {
"start": 101,
"end": 121,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 102,
"end": 120,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 102,
"end": 108,
"ctxt": 0
},
"value": "Symbol",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 109,
"end": 120,
"ctxt": 0
},
"value": "toPrimitive",
"optional": false
}
}
},
"function": {
"params": [
{
"type": "Parameter",
"span": {
"start": 122,
"end": 123,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 122,
"end": 123,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 97,
"end": 128,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 125,
"end": 128,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "setter",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}