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

275 lines
6.5 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 90,
"end": 242,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 90,
"end": 144,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 90,
"end": 144,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 90,
"end": 104,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 90,
"end": 96,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 97,
"end": 104,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "ObjectExpression",
"span": {
"start": 107,
"end": 144,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 113,
"end": 114,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "ObjectExpression",
"span": {
"start": 116,
"end": 142,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 126,
"end": 127,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": {
"type": "StringLiteral",
"span": {
"start": 129,
"end": 136,
"ctxt": 0
},
"value": "value",
"raw": "\"value\""
}
}
]
}
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 189,
"end": 223,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 195,
"end": 223,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 195,
"end": 200,
"ctxt": 0
},
"value": "value",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 203,
"end": 223,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 203,
"end": 221,
"ctxt": 0
},
"object": {
"type": "CallExpression",
"span": {
"start": 203,
"end": 219,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 203,
"end": 210,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 211,
"end": 218,
"ctxt": 0
},
"value": "./mod",
"raw": "\"./mod\""
}
}
],
"typeArguments": null
},
"property": {
"type": "Identifier",
"span": {
"start": 220,
"end": 221,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 222,
"end": 223,
"ctxt": 0
},
"value": "y",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 224,
"end": 242,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 224,
"end": 242,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 224,
"end": 235,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 224,
"end": 231,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 232,
"end": 235,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 236,
"end": 241,
"ctxt": 0
},
"value": "value",
"optional": false
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}