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

1021 lines
23 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 81,
"end": 640,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 81,
"end": 118,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 93,
"end": 117,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 93,
"end": 99,
"ctxt": 0
},
"value": "module",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 99,
"end": 117,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 101,
"end": 117,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 103,
"end": 115,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 103,
"end": 110,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 110,
"end": 115,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 112,
"end": 115,
"ctxt": 0
},
"kind": "any"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 136,
"end": 143,
"ctxt": 0
},
"value": "require",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 144,
"end": 156,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 144,
"end": 156,
"ctxt": 0
},
"value": "name",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 148,
"end": 156,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 150,
"end": 156,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 119,
"end": 163,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 157,
"end": 162,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 159,
"end": 162,
"ctxt": 0
},
"kind": "any"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 227,
"end": 263,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 227,
"end": 263,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 227,
"end": 252,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 227,
"end": 241,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 227,
"end": 233,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 234,
"end": 241,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 242,
"end": 252,
"ctxt": 0
},
"value": "bothBefore",
"optional": false
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 255,
"end": 263,
"ctxt": 0
},
"value": "string",
"raw": "'string'"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 264,
"end": 280,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 264,
"end": 280,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 264,
"end": 276,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 264,
"end": 265,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 266,
"end": 276,
"ctxt": 0
},
"value": "justExport",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 279,
"end": 280,
"ctxt": 0
},
"value": 4.0,
"raw": "4"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 281,
"end": 297,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 281,
"end": 297,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 281,
"end": 293,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 281,
"end": 282,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 283,
"end": 293,
"ctxt": 0
},
"value": "bothBefore",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 296,
"end": 297,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 298,
"end": 313,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 298,
"end": 313,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 298,
"end": 309,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 298,
"end": 299,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 300,
"end": 309,
"ctxt": 0
},
"value": "bothAfter",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 312,
"end": 313,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 314,
"end": 332,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 314,
"end": 332,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 314,
"end": 328,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 314,
"end": 320,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 321,
"end": 328,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 331,
"end": 332,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 342,
"end": 343,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 333,
"end": 364,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 346,
"end": 364,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 352,
"end": 362,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 352,
"end": 362,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 352,
"end": 358,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 352,
"end": 356,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 357,
"end": 358,
"ctxt": 0
},
"value": "p",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 361,
"end": 362,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 365,
"end": 400,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 365,
"end": 400,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 365,
"end": 389,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 365,
"end": 379,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 365,
"end": 371,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 372,
"end": 379,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 380,
"end": 389,
"ctxt": 0
},
"value": "bothAfter",
"optional": false
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 392,
"end": 400,
"ctxt": 0
},
"value": "string",
"raw": "'string'"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 401,
"end": 439,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 401,
"end": 439,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 401,
"end": 428,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 401,
"end": 415,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 401,
"end": 407,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 408,
"end": 415,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 416,
"end": 428,
"ctxt": 0
},
"value": "justProperty",
"optional": false
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 431,
"end": 439,
"ctxt": 0
},
"value": "string",
"raw": "'string'"
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 501,
"end": 529,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 505,
"end": 529,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 505,
"end": 509,
"ctxt": 0
},
"value": "mod1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 512,
"end": 529,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 512,
"end": 519,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 520,
"end": 528,
"ctxt": 0
},
"value": "./mod1",
"raw": "'./mod1'"
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 530,
"end": 555,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 530,
"end": 555,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 530,
"end": 553,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 530,
"end": 545,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 530,
"end": 534,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 535,
"end": 545,
"ctxt": 0
},
"value": "justExport",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 546,
"end": 553,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 556,
"end": 581,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 556,
"end": 581,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 556,
"end": 579,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 556,
"end": 571,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 556,
"end": 560,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 561,
"end": 571,
"ctxt": 0
},
"value": "bothBefore",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 572,
"end": 579,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 591,
"end": 615,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 591,
"end": 615,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 591,
"end": 613,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 591,
"end": 605,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 591,
"end": 595,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 596,
"end": 605,
"ctxt": 0
},
"value": "bothAfter",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 606,
"end": 613,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 616,
"end": 640,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 616,
"end": 640,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 616,
"end": 633,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 616,
"end": 620,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 621,
"end": 633,
"ctxt": 0
},
"value": "justProperty",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 634,
"end": 640,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
}
],
"interpreter": null
}