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

207 lines
5.7 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 115,
"end": 240,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 115,
"end": 240,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 115,
"end": 240,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 115,
"end": 129,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 115,
"end": 121,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 122,
"end": 129,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "ClassExpression",
"identifier": {
"type": "Identifier",
"span": {
"start": 138,
"end": 143,
"ctxt": 0
},
"value": "Thing",
"optional": false
},
"span": {
"start": 132,
"end": 240,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 191,
"end": 238,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 191,
"end": 202,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "Parameter",
"span": {
"start": 203,
"end": 204,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 203,
"end": 204,
"ctxt": 0
},
"value": "p",
"optional": false,
"typeAnnotation": null
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 206,
"end": 238,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 216,
"end": 232,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 216,
"end": 231,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 216,
"end": 222,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 216,
"end": 220,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 221,
"end": 222,
"ctxt": 0
},
"value": "t",
"optional": false
}
},
"right": {
"type": "BinaryExpression",
"span": {
"start": 225,
"end": 231,
"ctxt": 0
},
"operator": "+",
"left": {
"type": "NumericLiteral",
"span": {
"start": 225,
"end": 227,
"ctxt": 0
},
"value": 12.0,
"raw": "12"
},
"right": {
"type": "Identifier",
"span": {
"start": 230,
"end": 231,
"ctxt": 0
},
"value": "p",
"optional": false
}
}
}
}
]
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
}
],
"interpreter": null
}