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

176 lines
4.4 KiB
JSON

{
"type": "Module",
"span": {
"start": 116,
"end": 231,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 116,
"end": 168,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 123,
"end": 168,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 129,
"end": 167,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 129,
"end": 135,
"ctxt": 0
},
"value": "colors",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 138,
"end": 167,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 144,
"end": 153,
"ctxt": 0
},
"value": "royalBlue",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 155,
"end": 164,
"ctxt": 0
},
"value": "#6400e4",
"raw": "\"#6400e4\""
}
}
]
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 170,
"end": 231,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 177,
"end": 231,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 183,
"end": 230,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 183,
"end": 194,
"ctxt": 0
},
"value": "brandColors",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 197,
"end": 230,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 203,
"end": 209,
"ctxt": 0
},
"value": "purple",
"optional": false
},
"value": {
"type": "MemberExpression",
"span": {
"start": 211,
"end": 227,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 211,
"end": 217,
"ctxt": 0
},
"value": "colors",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 218,
"end": 227,
"ctxt": 0
},
"value": "royalBlue",
"optional": false
}
}
}
]
},
"definite": false
}
]
}
}
],
"interpreter": null
}