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

1021 lines
23 KiB
JSON

{
"type": "Script",
"span": {
"start": 82,
"end": 641,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 82,
"end": 119,
"ctxt": 0
},
"kind": "var",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 94,
"end": 118,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 94,
"end": 100,
"ctxt": 0
},
"value": "module",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 100,
"end": 118,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 102,
"end": 118,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 104,
"end": 116,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 104,
"end": 111,
"ctxt": 0
},
"value": "exports",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 111,
"end": 116,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 113,
"end": 116,
"ctxt": 0
},
"kind": "any"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 137,
"end": 144,
"ctxt": 0
},
"value": "require",
"optional": false
},
"declare": true,
"params": [
{
"type": "Parameter",
"span": {
"start": 145,
"end": 157,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 145,
"end": 157,
"ctxt": 0
},
"value": "name",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 149,
"end": 157,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 151,
"end": 157,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 120,
"end": 164,
"ctxt": 0
},
"body": null,
"generator": false,
"async": false,
"typeParameters": null,
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 158,
"end": 163,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 160,
"end": 163,
"ctxt": 0
},
"kind": "any"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 228,
"end": 264,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 228,
"end": 264,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 228,
"end": 253,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 228,
"end": 242,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 228,
"end": 234,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 235,
"end": 242,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 243,
"end": 253,
"ctxt": 0
},
"value": "bothBefore",
"optional": false
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 256,
"end": 264,
"ctxt": 0
},
"value": "string",
"raw": "'string'"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 265,
"end": 281,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 265,
"end": 281,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 265,
"end": 277,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 265,
"end": 266,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 267,
"end": 277,
"ctxt": 0
},
"value": "justExport",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 280,
"end": 281,
"ctxt": 0
},
"value": 4.0,
"raw": "4"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 282,
"end": 298,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 282,
"end": 298,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 282,
"end": 294,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 282,
"end": 283,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 284,
"end": 294,
"ctxt": 0
},
"value": "bothBefore",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 297,
"end": 298,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 299,
"end": 314,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 299,
"end": 314,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 299,
"end": 310,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 299,
"end": 300,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 301,
"end": 310,
"ctxt": 0
},
"value": "bothAfter",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 313,
"end": 314,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 315,
"end": 333,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 315,
"end": 333,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 315,
"end": 329,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 315,
"end": 321,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 322,
"end": 329,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 332,
"end": 333,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 343,
"end": 344,
"ctxt": 0
},
"value": "A",
"optional": false
},
"declare": false,
"params": [],
"decorators": [],
"span": {
"start": 334,
"end": 365,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 347,
"end": 365,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 353,
"end": 363,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 353,
"end": 363,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 353,
"end": 359,
"ctxt": 0
},
"object": {
"type": "ThisExpression",
"span": {
"start": 353,
"end": 357,
"ctxt": 0
}
},
"property": {
"type": "Identifier",
"span": {
"start": 358,
"end": 359,
"ctxt": 0
},
"value": "p",
"optional": false
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 362,
"end": 363,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
{
"type": "ExpressionStatement",
"span": {
"start": 366,
"end": 401,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 366,
"end": 401,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 366,
"end": 390,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 366,
"end": 380,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 366,
"end": 372,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 373,
"end": 380,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 381,
"end": 390,
"ctxt": 0
},
"value": "bothAfter",
"optional": false
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 393,
"end": 401,
"ctxt": 0
},
"value": "string",
"raw": "'string'"
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 402,
"end": 440,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 402,
"end": 440,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "MemberExpression",
"span": {
"start": 402,
"end": 429,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 402,
"end": 416,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 402,
"end": 408,
"ctxt": 0
},
"value": "module",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 409,
"end": 416,
"ctxt": 0
},
"value": "exports",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 417,
"end": 429,
"ctxt": 0
},
"value": "justProperty",
"optional": false
}
},
"right": {
"type": "StringLiteral",
"span": {
"start": 432,
"end": 440,
"ctxt": 0
},
"value": "string",
"raw": "'string'"
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 502,
"end": 530,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 506,
"end": 530,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 506,
"end": 510,
"ctxt": 0
},
"value": "mod1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 513,
"end": 530,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 513,
"end": 520,
"ctxt": 0
},
"value": "require",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "StringLiteral",
"span": {
"start": 521,
"end": 529,
"ctxt": 0
},
"value": "./mod1",
"raw": "'./mod1'"
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 531,
"end": 556,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 531,
"end": 556,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 531,
"end": 554,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 531,
"end": 546,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 531,
"end": 535,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 536,
"end": 546,
"ctxt": 0
},
"value": "justExport",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 547,
"end": 554,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 557,
"end": 582,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 557,
"end": 582,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 557,
"end": 580,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 557,
"end": 572,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 557,
"end": 561,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 562,
"end": 572,
"ctxt": 0
},
"value": "bothBefore",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 573,
"end": 580,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 592,
"end": 616,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 592,
"end": 616,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 592,
"end": 614,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 592,
"end": 606,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 592,
"end": 596,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 597,
"end": 606,
"ctxt": 0
},
"value": "bothAfter",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 607,
"end": 614,
"ctxt": 0
},
"value": "toFixed",
"optional": false
}
},
"arguments": [],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 617,
"end": 641,
"ctxt": 0
},
"expression": {
"type": "MemberExpression",
"span": {
"start": 617,
"end": 641,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 617,
"end": 634,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 617,
"end": 621,
"ctxt": 0
},
"value": "mod1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 622,
"end": 634,
"ctxt": 0
},
"value": "justProperty",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 635,
"end": 641,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
}
],
"interpreter": null
}