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

301 lines
6.6 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 115,
"end": 218,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 115,
"end": 142,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 121,
"end": 142,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 121,
"end": 122,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 125,
"end": 142,
"ctxt": 0
},
"object": {
"type": "CallExpression",
"span": {
"start": 125,
"end": 140,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 125,
"end": 132,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 133,
"end": 139,
"ctxt": 0
},
"value": "./ch",
"raw": "'./ch'"
}
}
],
"typeArguments": null
},
"property": {
"type": "Identifier",
"span": {
"start": 141,
"end": 142,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 143,
"end": 144,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 143,
"end": 144,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 145,
"end": 151,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 145,
"end": 151,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 145,
"end": 146,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 147,
"end": 151,
"ctxt": 0
},
"value": "grey",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 152,
"end": 160,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 152,
"end": 160,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 152,
"end": 155,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 152,
"end": 153,
"ctxt": 0
},
"value": "x",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 154,
"end": 155,
"ctxt": 0
},
"value": "x",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 156,
"end": 160,
"ctxt": 0
},
"value": "grey",
"optional": false
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 181,
"end": 205,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 187,
"end": 205,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 187,
"end": 188,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 191,
"end": 205,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 195,
"end": 199,
"ctxt": 0
},
"value": "grey",
"optional": false
},
"value": {
"type": "ObjectExpression",
"span": {
"start": 201,
"end": 203,
"ctxt": 0
},
"properties": []
}
}
]
},
"definite": false
}
]
},
{
"type": "ExportNamedDeclaration",
"span": {
"start": 206,
"end": 218,
"ctxt": 0
},
"specifiers": [
{
"type": "ExportSpecifier",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"orig": {
"type": "Identifier",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"value": "x",
"optional": false
},
"exported": null,
"isTypeOnly": false
}
],
"source": null,
"typeOnly": false,
"asserts": null
}
],
"interpreter": null
}