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

932 lines
34 KiB
JSON
Raw Normal View History

{
"type": "Module",
"span": {
"start": 23,
"end": 593,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 23,
"end": 301,
"ctxt": 0
},
"declaration": {
"type": "TsModuleDeclaration",
"span": {
"start": 30,
"end": 301,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"value": "A",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 39,
"end": 301,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 45,
"end": 113,
"ctxt": 0
},
"declaration": {
"type": "TsInterfaceDeclaration",
"span": {
"start": 52,
"end": 113,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 62,
"end": 67,
"ctxt": 0
},
"value": "Point",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 68,
"end": 113,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 78,
"end": 88,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 78,
"end": 79,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 79,
"end": 87,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 81,
"end": 87,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 97,
"end": 107,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 97,
"end": 98,
"ctxt": 0
},
"value": "y",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 98,
"end": 106,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 100,
"end": 106,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 119,
"end": 251,
"ctxt": 0
},
"declaration": {
"type": "TsModuleDeclaration",
"span": {
"start": 126,
"end": 251,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 133,
"end": 138,
"ctxt": 0
},
"value": "Utils",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 139,
"end": 251,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 149,
"end": 245,
"ctxt": 0
},
"declaration": {
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 165,
"end": 171,
"ctxt": 0
},
"value": "mirror",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 189,
"end": 193,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 189,
"end": 193,
"ctxt": 0
},
"value": "p",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 190,
"end": 193,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 192,
"end": 193,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 192,
"end": 193,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 156,
"end": 245,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 195,
"end": 245,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 209,
"end": 235,
"ctxt": 0
},
"argument": {
"type": "ObjectExpression",
"span": {
"start": 216,
"end": 234,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 218,
"end": 219,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "MemberExpression",
"span": {
"start": 221,
"end": 224,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 221,
"end": 222,
"ctxt": 0
},
"value": "p",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 223,
"end": 224,
"ctxt": 0
},
"value": "y",
"optional": false
}
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 226,
"end": 227,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": {
"type": "MemberExpression",
"span": {
"start": 229,
"end": 232,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 229,
"end": 230,
"ctxt": 0
},
"value": "p",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 231,
"end": 232,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
}
]
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 171,
"end": 188,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 172,
"end": 187,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 172,
"end": 173,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 182,
"end": 187,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 182,
"end": 187,
"ctxt": 0
},
"value": "Point",
"optional": false
},
"typeParams": null
},
"default": null
}
]
},
"returnType": null
}
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 257,
"end": 299,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 264,
"end": 299,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 268,
"end": 298,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 268,
"end": 274,
"ctxt": 0
},
"value": "Origin",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 274,
"end": 281,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 276,
"end": 281,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 276,
"end": 281,
"ctxt": 0
},
"value": "Point",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 284,
"end": 298,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 286,
"end": 287,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 289,
"end": 290,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 292,
"end": 293,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 295,
"end": 296,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
},
"definite": false
}
]
}
}
]
}
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 325,
"end": 593,
"ctxt": 0
},
"declaration": {
"type": "TsModuleDeclaration",
"span": {
"start": 332,
"end": 593,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 339,
"end": 340,
"ctxt": 0
},
"value": "A",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 341,
"end": 593,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 413,
"end": 455,
"ctxt": 0
},
"declaration": {
"type": "VariableDeclaration",
"span": {
"start": 420,
"end": 455,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 424,
"end": 454,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 424,
"end": 430,
"ctxt": 0
},
"value": "Origin",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 430,
"end": 437,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 432,
"end": 437,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 432,
"end": 437,
"ctxt": 0
},
"value": "Point",
"optional": false
},
"typeParams": null
}
}
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 440,
"end": 454,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 442,
"end": 443,
"ctxt": 0
},
"value": "x",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 445,
"end": 446,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
},
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 448,
"end": 449,
"ctxt": 0
},
"value": "y",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 451,
"end": 452,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
]
},
"definite": false
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 461,
"end": 591,
"ctxt": 0
},
"declaration": {
"type": "TsModuleDeclaration",
"span": {
"start": 468,
"end": 591,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 475,
"end": 480,
"ctxt": 0
},
"value": "Utils",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 481,
"end": 591,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 491,
"end": 585,
"ctxt": 0
},
"declaration": {
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 504,
"end": 509,
"ctxt": 0
},
"value": "Plane",
"optional": false
},
"declare": false,
"span": {
"start": 498,
"end": 585,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "Constructor",
"span": {
"start": 524,
"end": 575,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 524,
"end": 535,
"ctxt": 0
},
"value": "constructor",
"optional": false
},
"params": [
{
"type": "TsParameterProperty",
"span": {
"start": 536,
"end": 552,
"ctxt": 0
},
"decorators": [],
"accessibility": "public",
"override": false,
"readonly": false,
"param": {
"type": "Identifier",
"span": {
"start": 543,
"end": 552,
"ctxt": 0
},
"value": "tl",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 545,
"end": 552,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 547,
"end": 552,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 547,
"end": 552,
"ctxt": 0
},
"value": "Point",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "TsParameterProperty",
"span": {
"start": 554,
"end": 570,
"ctxt": 0
},
"decorators": [],
"accessibility": "public",
"override": false,
"readonly": false,
"param": {
"type": "Identifier",
"span": {
"start": 561,
"end": 570,
"ctxt": 0
},
"value": "br",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 563,
"end": 570,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 565,
"end": 570,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 565,
"end": 570,
"ctxt": 0
},
"value": "Point",
"optional": false
},
"typeParams": null
}
}
}
}
],
"body": {
"type": "BlockStatement",
"span": {
"start": 572,
"end": 575,
"ctxt": 0
},
"stmts": []
},
"accessibility": null,
"isOptional": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
}
]
}
}
}
]
}
}
}
],
"interpreter": null
}