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

230 lines
5.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 19,
"end": 123,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 19,
"end": 49,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 26,
"end": 27,
"ctxt": 0
},
"value": "m",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 28,
"end": 49,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 34,
"end": 47,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 41,
"end": 47,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 45,
"end": 46,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 45,
"end": 46,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 51,
"end": 123,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 58,
"end": 59,
"ctxt": 0
},
"value": "m",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 60,
"end": 123,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 66,
"end": 76,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 70,
"end": 75,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 70,
"end": 71,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"value": "x",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 81,
"end": 121,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 85,
"end": 120,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 85,
"end": 86,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 89,
"end": 120,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 99,
"end": 100,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 102,
"end": 103,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
{
"type": "Identifier",
"span": {
"start": 113,
"end": 114,
"ctxt": 0
},
"value": "x",
"optional": false
}
]
},
"definite": false
}
]
}
]
}
}
],
"interpreter": null
}