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

254 lines
5.7 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 114,
"end": 226,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 114,
"end": 157,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 120,
"end": 156,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 120,
"end": 127,
"ctxt": 0
},
"value": "Strings",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 130,
"end": 156,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 136,
"end": 137,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 139,
"end": 142,
"ctxt": 0
},
"value": "A",
"raw": "\"A\""
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 148,
"end": 149,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 151,
"end": 154,
"ctxt": 0
},
"value": "B",
"raw": "\"B\""
}
}
]
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 164,
"end": 167,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"declare": false,
"span": {
"start": 158,
"end": 170,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExpressionStatement",
"span": {
"start": 171,
"end": 192,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 171,
"end": 191,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 171,
"end": 185,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 171,
"end": 177,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 178,
"end": 185,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 188,
"end": 191,
"ctxt": 0
},
"value": "Foo",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 193,
"end": 226,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 193,
"end": 225,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 193,
"end": 215,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 193,
"end": 207,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 193,
"end": 199,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 200,
"end": 207,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 208,
"end": 215,
"ctxt": 0
},
"value": "Strings",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 218,
"end": 225,
"ctxt": 0
},
"value": "Strings",
"optional": false
}
}
}
],
"interpreter": null
}