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

320 lines
7.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 116,
"end": 285,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 116,
"end": 159,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 122,
"end": 158,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 122,
"end": 129,
"ctxt": 0
},
"value": "Strings",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 132,
"end": 158,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 138,
"end": 139,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"value": "A",
"raw": "\"A\""
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 150,
"end": 151,
"ctxt": 0
},
"value": "b",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 153,
"end": 156,
"ctxt": 0
},
"value": "B",
"raw": "\"B\""
}
}
]
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 160,
"end": 251,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 160,
"end": 250,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 160,
"end": 174,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 160,
"end": 166,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 167,
"end": 174,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 177,
"end": 250,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 183,
"end": 188,
"ctxt": 0
},
"value": "thing",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 190,
"end": 194,
"ctxt": 0
},
"value": "ok",
"raw": "\"ok\""
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 200,
"end": 204,
"ctxt": 0
},
"value": "also",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 206,
"end": 210,
"ctxt": 0
},
"value": "ok",
"raw": "\"ok\""
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 216,
"end": 220,
"ctxt": 0
},
"value": "desc",
"optional": false
},
"value": {
"type": "ObjectExpression",
"span": {
"start": 222,
"end": 248,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 232,
"end": 236,
"ctxt": 0
},
"value": "item",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 238,
"end": 242,
"ctxt": 0
},
"value": "ok",
"raw": "\"ok\""
}
}
]
}
}
]
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 252,
"end": 285,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 252,
"end": 284,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 252,
"end": 274,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 252,
"end": 266,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 252,
"end": 258,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 259,
"end": 266,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 267,
"end": 274,
"ctxt": 0
},
"value": "Strings",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 277,
"end": 284,
"ctxt": 0
},
"value": "Strings",
"optional": false
}
}
}
],
"interpreter": null
}