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

262 lines
5.9 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 113,
"end": 225,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 113,
"end": 156,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 119,
"end": 155,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 119,
"end": 126,
"ctxt": 0
},
"value": "Strings",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 129,
"end": 155,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 135,
"end": 136,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 138,
"end": 141,
"ctxt": 0
},
"value": "A",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 147,
"end": 148,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 150,
"end": 153,
"ctxt": 0
},
"value": "B",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
},
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 163,
"end": 166,
"ctxt": 0
},
"value": "Foo",
"optional": false
},
"declare": false,
"span": {
"start": 157,
"end": 169,
"ctxt": 0
},
"decorators": [],
"body": [],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "ExpressionStatement",
"span": {
"start": 170,
"end": 191,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 170,
"end": 190,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 170,
"end": 184,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 170,
"end": 176,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 177,
"end": 184,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 187,
"end": 190,
"ctxt": 0
},
"value": "Foo",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 192,
"end": 225,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 192,
"end": 224,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 192,
"end": 214,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 192,
"end": 206,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 192,
"end": 198,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 199,
"end": 206,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 207,
"end": 214,
"ctxt": 0
},
"value": "Strings",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 217,
"end": 224,
"ctxt": 0
},
"value": "Strings",
"optional": false
}
}
}
],
"interpreter": null
}