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

611 lines
14 KiB
JSON

{
"type": "Script",
"span": {
"start": 123,
"end": 421,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 123,
"end": 149,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 123,
"end": 148,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 123,
"end": 136,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 123,
"end": 130,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 131,
"end": 136,
"ctxt": 0
},
"value": "apply",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 139,
"end": 148,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 150,
"end": 176,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 150,
"end": 175,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 150,
"end": 163,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 150,
"end": 157,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 158,
"end": 163,
"ctxt": 0
},
"value": "apply",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 166,
"end": 175,
"ctxt": 0
},
"value": "undefined",
"optional": false
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 186,
"end": 187,
"ctxt": 0
},
"value": "a",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 177,
"end": 193,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 190,
"end": 193,
"ctxt": 0
},
"stmts": []
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 194,
"end": 212,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 194,
"end": 211,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 194,
"end": 207,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 194,
"end": 201,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 202,
"end": 207,
"ctxt": 0
},
"value": "apply",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 210,
"end": 211,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 213,
"end": 228,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 213,
"end": 228,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 213,
"end": 226,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 213,
"end": 220,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 221,
"end": 226,
"ctxt": 0
},
"value": "apply",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 229,
"end": 249,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 229,
"end": 249,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 229,
"end": 242,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 229,
"end": 236,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 237,
"end": 242,
"ctxt": 0
},
"value": "apply",
"optional": false
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 245,
"end": 249,
"ctxt": 0
},
"value": "ok",
"raw": "'ok'"
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 250,
"end": 286,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 254,
"end": 286,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 254,
"end": 256,
"ctxt": 0
},
"value": "OK",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 259,
"end": 286,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 259,
"end": 284,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 259,
"end": 272,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 259,
"end": 266,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 267,
"end": 272,
"ctxt": 0
},
"value": "apply",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 273,
"end": 284,
"ctxt": 0
},
"value": "toUpperCase",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 287,
"end": 304,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 287,
"end": 304,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 287,
"end": 300,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 287,
"end": 294,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 295,
"end": 300,
"ctxt": 0
},
"value": "apply",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 303,
"end": 304,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 328,
"end": 390,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 334,
"end": 390,
"ctxt": 0
},
"id": {
"type": "ObjectPattern",
"span": {
"start": 334,
"end": 343,
"ctxt": 0
},
"properties": [
{
"type": "AssignmentPatternProperty",
"span": {
"start": 336,
"end": 341,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 336,
"end": 341,
"ctxt": 0
},
"value": "apply",
"optional": false
},
"value": null
}
],
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 346,
"end": 390,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 346,
"end": 353,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 354,
"end": 389,
"ctxt": 0
},
"value": "./moduleExportAliasDuplicateAlias",
"raw": "'./moduleExportAliasDuplicateAlias'"
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 391,
"end": 421,
"ctxt": 0
},
"kind": "const",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 397,
"end": 421,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 397,
"end": 403,
"ctxt": 0
},
"value": "result",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 406,
"end": 421,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 406,
"end": 419,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 406,
"end": 411,
"ctxt": 0
},
"value": "apply",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 412,
"end": 419,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}