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

1319 lines
42 KiB
JSON

{
"type": "Script",
"span": {
"start": 0,
"end": 600,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 0,
"end": 111,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 7,
"end": 8,
"ctxt": 0
},
"value": "A",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 9,
"end": 111,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 15,
"end": 109,
"ctxt": 0
},
"declaration": {
"type": "TsInterfaceDeclaration",
"span": {
"start": 22,
"end": 109,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 32,
"end": 37,
"ctxt": 0
},
"value": "Point",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 38,
"end": 109,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 48,
"end": 58,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 48,
"end": 49,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 49,
"end": 57,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 51,
"end": 57,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 67,
"end": 77,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 67,
"end": 68,
"ctxt": 0
},
"value": "y",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 68,
"end": 76,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 70,
"end": 76,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 86,
"end": 103,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 86,
"end": 93,
"ctxt": 0
},
"value": "toCarth",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 95,
"end": 102,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 97,
"end": 102,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 97,
"end": 102,
"ctxt": 0
},
"value": "Point",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 113,
"end": 181,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"value": "A",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 122,
"end": 181,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 128,
"end": 179,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 138,
"end": 143,
"ctxt": 0
},
"value": "Point",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 144,
"end": 179,
"ctxt": 0
},
"body": [
{
"type": "TsMethodSignature",
"span": {
"start": 154,
"end": 173,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 154,
"end": 163,
"ctxt": 0
},
"value": "fromCarth",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 165,
"end": 172,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 167,
"end": 172,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 167,
"end": 172,
"ctxt": 0
},
"value": "Point",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 212,
"end": 265,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 216,
"end": 264,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 216,
"end": 217,
"ctxt": 0
},
"value": "p",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 217,
"end": 264,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 219,
"end": 264,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 221,
"end": 231,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 221,
"end": 222,
"ctxt": 0
},
"value": "x",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 222,
"end": 230,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 224,
"end": 230,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 232,
"end": 242,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 232,
"end": 233,
"ctxt": 0
},
"value": "y",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 233,
"end": 241,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 235,
"end": 241,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsMethodSignature",
"span": {
"start": 243,
"end": 262,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 243,
"end": 250,
"ctxt": 0
},
"value": "toCarth",
"optional": false
},
"computed": false,
"optional": false,
"params": [],
"typeAnn": {
"type": "TsTypeAnnotation",
"span": {
"start": 252,
"end": 261,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 254,
"end": 261,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 254,
"end": 255,
"ctxt": 0
},
"value": "A",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 256,
"end": 261,
"ctxt": 0
},
"value": "Point",
"optional": false
}
},
"typeParams": null
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 266,
"end": 281,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 270,
"end": 280,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 270,
"end": 271,
"ctxt": 0
},
"value": "p",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 271,
"end": 280,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 273,
"end": 280,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 273,
"end": 274,
"ctxt": 0
},
"value": "A",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 275,
"end": 280,
"ctxt": 0
},
"value": "Point",
"optional": false
}
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 283,
"end": 377,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 290,
"end": 291,
"ctxt": 0
},
"value": "X",
"optional": false
},
"body": {
"type": "TsNamespaceDeclaration",
"span": {
"start": 292,
"end": 377,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 292,
"end": 293,
"ctxt": 0
},
"value": "Y",
"optional": false
},
"body": {
"type": "TsNamespaceDeclaration",
"span": {
"start": 294,
"end": 377,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 294,
"end": 295,
"ctxt": 0
},
"value": "Z",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 296,
"end": 377,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 302,
"end": 375,
"ctxt": 0
},
"declaration": {
"type": "TsInterfaceDeclaration",
"span": {
"start": 309,
"end": 375,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 319,
"end": 323,
"ctxt": 0
},
"value": "Line",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 324,
"end": 375,
"ctxt": 0
},
"body": [
{
"type": "TsConstructSignatureDeclaration",
"span": {
"start": 334,
"end": 369,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 339,
"end": 353,
"ctxt": 0
},
"value": "start",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 344,
"end": 353,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 346,
"end": 353,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 346,
"end": 347,
"ctxt": 0
},
"value": "A",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 348,
"end": 353,
"ctxt": 0
},
"value": "Point",
"optional": false
}
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 355,
"end": 367,
"ctxt": 0
},
"value": "end",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 358,
"end": 367,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 360,
"end": 367,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 360,
"end": 361,
"ctxt": 0
},
"value": "A",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 362,
"end": 367,
"ctxt": 0
},
"value": "Point",
"optional": false
}
},
"typeParams": null
}
}
}
],
"typeAnnotation": null,
"typeParams": null
}
]
}
}
}
]
}
}
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 379,
"end": 510,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 386,
"end": 387,
"ctxt": 0
},
"value": "X",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 388,
"end": 510,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 394,
"end": 508,
"ctxt": 0
},
"declaration": {
"type": "TsModuleDeclaration",
"span": {
"start": 401,
"end": 508,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 408,
"end": 409,
"ctxt": 0
},
"value": "Y",
"optional": false
},
"body": {
"type": "TsNamespaceDeclaration",
"span": {
"start": 410,
"end": 508,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 410,
"end": 411,
"ctxt": 0
},
"value": "Z",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 412,
"end": 508,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 422,
"end": 502,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 432,
"end": 436,
"ctxt": 0
},
"value": "Line",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 437,
"end": 502,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 451,
"end": 466,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 451,
"end": 456,
"ctxt": 0
},
"value": "start",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 456,
"end": 465,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 458,
"end": 465,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 458,
"end": 459,
"ctxt": 0
},
"value": "A",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 460,
"end": 465,
"ctxt": 0
},
"value": "Point",
"optional": false
}
},
"typeParams": null
}
},
"typeParams": null
},
{
"type": "TsPropertySignature",
"span": {
"start": 479,
"end": 492,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 479,
"end": 482,
"ctxt": 0
},
"value": "end",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 482,
"end": 491,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 484,
"end": 491,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 484,
"end": 485,
"ctxt": 0
},
"value": "A",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 486,
"end": 491,
"ctxt": 0
},
"value": "Point",
"optional": false
}
},
"typeParams": null
}
},
"typeParams": null
}
]
}
}
]
}
}
}
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 541,
"end": 581,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 545,
"end": 581,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 545,
"end": 546,
"ctxt": 0
},
"value": "l",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 546,
"end": 581,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 548,
"end": 581,
"ctxt": 0
},
"members": [
{
"type": "TsConstructSignatureDeclaration",
"span": {
"start": 550,
"end": 579,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 555,
"end": 565,
"ctxt": 0
},
"value": "s",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 556,
"end": 565,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 558,
"end": 565,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 558,
"end": 559,
"ctxt": 0
},
"value": "A",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 560,
"end": 565,
"ctxt": 0
},
"value": "Point",
"optional": false
}
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 567,
"end": 577,
"ctxt": 0
},
"value": "e",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 568,
"end": 577,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 570,
"end": 577,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 570,
"end": 571,
"ctxt": 0
},
"value": "A",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 572,
"end": 577,
"ctxt": 0
},
"value": "Point",
"optional": false
}
},
"typeParams": null
}
}
}
],
"typeAnnotation": null,
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 582,
"end": 600,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 586,
"end": 599,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 586,
"end": 587,
"ctxt": 0
},
"value": "l",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 587,
"end": 599,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 589,
"end": 599,
"ctxt": 0
},
"typeName": {
"type": "TsQualifiedName",
"left": {
"type": "TsQualifiedName",
"left": {
"type": "TsQualifiedName",
"left": {
"type": "Identifier",
"span": {
"start": 589,
"end": 590,
"ctxt": 0
},
"value": "X",
"optional": false
},
"right": {
"type": "Identifier",
"span": {
"start": 591,
"end": 592,
"ctxt": 0
},
"value": "Y",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 593,
"end": 594,
"ctxt": 0
},
"value": "Z",
"optional": false
}
},
"right": {
"type": "Identifier",
"span": {
"start": 595,
"end": 599,
"ctxt": 0
},
"value": "Line",
"optional": false
}
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
}
],
"interpreter": null
}