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

230 lines
5.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 17,
"end": 121,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 17,
"end": 47,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 24,
"end": 25,
"ctxt": 0
},
"value": "m",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 26,
"end": 47,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 32,
"end": 45,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 39,
"end": 45,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 43,
"end": 44,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 43,
"end": 44,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": null,
"definite": false
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 49,
"end": 121,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 56,
"end": 57,
"ctxt": 0
},
"value": "m",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 58,
"end": 121,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 64,
"end": 74,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 68,
"end": 73,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 68,
"end": 69,
"ctxt": 0
},
"value": "z",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "Identifier",
"span": {
"start": 72,
"end": 73,
"ctxt": 0
},
"value": "x",
"optional": false
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 79,
"end": 119,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 83,
"end": 118,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 83,
"end": 84,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 87,
"end": 118,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 97,
"end": 98,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "Identifier",
"span": {
"start": 100,
"end": 101,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
{
"type": "Identifier",
"span": {
"start": 111,
"end": 112,
"ctxt": 0
},
"value": "x",
"optional": false
}
]
},
"definite": false
}
]
}
]
}
}
],
"interpreter": null
}