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

340 lines
8.4 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 115,
"end": 284,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 115,
"end": 158,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 121,
"end": 157,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 121,
"end": 128,
"ctxt": 0
},
"value": "Strings",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 131,
"end": 157,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 137,
"end": 138,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 140,
"end": 143,
"ctxt": 0
},
"value": "A",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 149,
"end": 150,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 152,
"end": 155,
"ctxt": 0
},
"value": "B",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 159,
"end": 250,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 159,
"end": 249,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 159,
"end": 173,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 159,
"end": 165,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 166,
"end": 173,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 176,
"end": 249,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 182,
"end": 187,
"ctxt": 0
},
"value": "thing",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 189,
"end": 193,
"ctxt": 0
},
"value": "ok",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 199,
"end": 203,
"ctxt": 0
},
"value": "also",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 205,
"end": 209,
"ctxt": 0
},
"value": "ok",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 215,
"end": 219,
"ctxt": 0
},
"value": "desc",
"optional": false
},
"value": {
"type": "ObjectExpression",
"span": {
"start": 221,
"end": 247,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 231,
"end": 235,
"ctxt": 0
},
"value": "item",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 237,
"end": 241,
"ctxt": 0
},
"value": "ok",
"hasEscape": false,
"kind": {
"type": "normal",
"containsQuote": true
}
}
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 251,
"end": 284,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 251,
"end": 283,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 251,
"end": 273,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 251,
"end": 265,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 251,
"end": 257,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 258,
"end": 265,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 266,
"end": 273,
"ctxt": 0
},
"value": "Strings",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 276,
"end": 283,
"ctxt": 0
},
"value": "Strings",
"optional": false
}
}
}
],
"interpreter": null
}