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

2086 lines
60 KiB
JSON

{
"type": "Script",
"span": {
"start": 177,
"end": 1402,
"ctxt": 0
},
"body": [
{
"type": "TsModuleDeclaration",
"span": {
"start": 177,
"end": 478,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 184,
"end": 186,
"ctxt": 0
},
"value": "M1",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 187,
"end": 478,
"ctxt": 0
},
"body": [
{
"type": "TsEnumDeclaration",
"span": {
"start": 193,
"end": 228,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 198,
"end": 204,
"ctxt": 0
},
"value": "EImpl1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 215,
"end": 216,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 218,
"end": 219,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 218,
"end": 219,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 221,
"end": 222,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 221,
"end": 222,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": null
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 234,
"end": 273,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 239,
"end": 245,
"ctxt": 0
},
"value": "EImpl1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 256,
"end": 261,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 256,
"end": 257,
"ctxt": 0
},
"value": "D",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 260,
"end": 261,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"type": "TsEnumMember",
"span": {
"start": 263,
"end": 264,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 263,
"end": 264,
"ctxt": 0
},
"value": "E",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 266,
"end": 267,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 266,
"end": 267,
"ctxt": 0
},
"value": "F",
"optional": false
},
"init": null
}
]
},
{
"type": "ExportDeclaration",
"span": {
"start": 279,
"end": 334,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 286,
"end": 334,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 291,
"end": 298,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 309,
"end": 314,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 309,
"end": 310,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 313,
"end": 314,
"ctxt": 0
},
"value": 3.0,
"raw": "3"
}
},
{
"type": "TsEnumMember",
"span": {
"start": 316,
"end": 321,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 316,
"end": 317,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 320,
"end": 321,
"ctxt": 0
},
"value": 2.0,
"raw": "2"
}
},
{
"type": "TsEnumMember",
"span": {
"start": 323,
"end": 328,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 323,
"end": 324,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 327,
"end": 328,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 340,
"end": 395,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 347,
"end": 395,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 352,
"end": 359,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 370,
"end": 375,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 370,
"end": 371,
"ctxt": 0
},
"value": "D",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 374,
"end": 375,
"ctxt": 0
},
"value": 7.0,
"raw": "7"
}
},
{
"type": "TsEnumMember",
"span": {
"start": 377,
"end": 382,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 377,
"end": 378,
"ctxt": 0
},
"value": "E",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 381,
"end": 382,
"ctxt": 0
},
"value": 9.0,
"raw": "9"
}
},
{
"type": "TsEnumMember",
"span": {
"start": 384,
"end": 389,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 384,
"end": 385,
"ctxt": 0
},
"value": "F",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 388,
"end": 389,
"ctxt": 0
},
"value": 8.0,
"raw": "8"
}
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 401,
"end": 476,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 405,
"end": 475,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 405,
"end": 406,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 409,
"end": 475,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 410,
"end": 419,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 410,
"end": 417,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 418,
"end": 419,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 421,
"end": 430,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 421,
"end": 428,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 429,
"end": 430,
"ctxt": 0
},
"value": "B",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 432,
"end": 441,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 432,
"end": 439,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 440,
"end": 441,
"ctxt": 0
},
"value": "C",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 443,
"end": 452,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 443,
"end": 450,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 451,
"end": 452,
"ctxt": 0
},
"value": "D",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 454,
"end": 463,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 454,
"end": 461,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 462,
"end": 463,
"ctxt": 0
},
"value": "E",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 465,
"end": 474,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 465,
"end": 472,
"ctxt": 0
},
"value": "EConst1",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 473,
"end": 474,
"ctxt": 0
},
"value": "F",
"optional": false
}
}
}
]
},
"definite": false
}
]
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 564,
"end": 837,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 571,
"end": 573,
"ctxt": 0
},
"value": "M2",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 574,
"end": 837,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 580,
"end": 667,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 587,
"end": 667,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 592,
"end": 598,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 609,
"end": 625,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 609,
"end": 610,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 613,
"end": 625,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 613,
"end": 618,
"ctxt": 0
},
"value": "foo",
"raw": "'foo'"
},
"property": {
"type": "Identifier",
"span": {
"start": 619,
"end": 625,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
},
{
"type": "TsEnumMember",
"span": {
"start": 627,
"end": 643,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 627,
"end": 628,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 631,
"end": 643,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 631,
"end": 636,
"ctxt": 0
},
"value": "foo",
"raw": "'foo'"
},
"property": {
"type": "Identifier",
"span": {
"start": 637,
"end": 643,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
},
{
"type": "TsEnumMember",
"span": {
"start": 645,
"end": 661,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 645,
"end": 646,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 649,
"end": 661,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 649,
"end": 654,
"ctxt": 0
},
"value": "foo",
"raw": "'foo'"
},
"property": {
"type": "Identifier",
"span": {
"start": 655,
"end": 661,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
}
]
}
},
{
"type": "ExportDeclaration",
"span": {
"start": 673,
"end": 760,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 680,
"end": 760,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 685,
"end": 691,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 702,
"end": 718,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 702,
"end": 703,
"ctxt": 0
},
"value": "D",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 706,
"end": 718,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 706,
"end": 711,
"ctxt": 0
},
"value": "foo",
"raw": "'foo'"
},
"property": {
"type": "Identifier",
"span": {
"start": 712,
"end": 718,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
},
{
"type": "TsEnumMember",
"span": {
"start": 720,
"end": 736,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 720,
"end": 721,
"ctxt": 0
},
"value": "E",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 724,
"end": 736,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 724,
"end": 729,
"ctxt": 0
},
"value": "foo",
"raw": "'foo'"
},
"property": {
"type": "Identifier",
"span": {
"start": 730,
"end": 736,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
},
{
"type": "TsEnumMember",
"span": {
"start": 738,
"end": 754,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 738,
"end": 739,
"ctxt": 0
},
"value": "F",
"optional": false
},
"init": {
"type": "MemberExpression",
"span": {
"start": 742,
"end": 754,
"ctxt": 0
},
"object": {
"type": "StringLiteral",
"span": {
"start": 742,
"end": 747,
"ctxt": 0
},
"value": "foo",
"raw": "'foo'"
},
"property": {
"type": "Identifier",
"span": {
"start": 748,
"end": 754,
"ctxt": 0
},
"value": "length",
"optional": false
}
}
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 766,
"end": 835,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 770,
"end": 834,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 770,
"end": 771,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ArrayExpression",
"span": {
"start": 774,
"end": 834,
"ctxt": 0
},
"elements": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 775,
"end": 783,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 775,
"end": 781,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 782,
"end": 783,
"ctxt": 0
},
"value": "A",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 785,
"end": 793,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 785,
"end": 791,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 792,
"end": 793,
"ctxt": 0
},
"value": "B",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 795,
"end": 803,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 795,
"end": 801,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 802,
"end": 803,
"ctxt": 0
},
"value": "C",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 805,
"end": 813,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 805,
"end": 811,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 812,
"end": 813,
"ctxt": 0
},
"value": "D",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 815,
"end": 823,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 815,
"end": 821,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 822,
"end": 823,
"ctxt": 0
},
"value": "E",
"optional": false
}
}
},
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 825,
"end": 833,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 825,
"end": 831,
"ctxt": 0
},
"value": "EComp2",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 832,
"end": 833,
"ctxt": 0
},
"value": "F",
"optional": false
}
}
}
]
},
"definite": false
}
]
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 944,
"end": 1045,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 951,
"end": 953,
"ctxt": 0
},
"value": "M3",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 954,
"end": 1045,
"ctxt": 0
},
"body": [
{
"type": "TsEnumDeclaration",
"span": {
"start": 960,
"end": 999,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 965,
"end": 970,
"ctxt": 0
},
"value": "EInit",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 981,
"end": 982,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 981,
"end": 982,
"ctxt": 0
},
"value": "A",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 992,
"end": 993,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 992,
"end": 993,
"ctxt": 0
},
"value": "B",
"optional": false
},
"init": null
}
]
},
{
"type": "TsEnumDeclaration",
"span": {
"start": 1005,
"end": 1043,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 1010,
"end": 1015,
"ctxt": 0
},
"value": "EInit",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1026,
"end": 1031,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1026,
"end": 1027,
"ctxt": 0
},
"value": "C",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 1030,
"end": 1031,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
},
{
"type": "TsEnumMember",
"span": {
"start": 1033,
"end": 1034,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1033,
"end": 1034,
"ctxt": 0
},
"value": "D",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1036,
"end": 1037,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1036,
"end": 1037,
"ctxt": 0
},
"value": "E",
"optional": false
},
"init": null
}
]
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 1097,
"end": 1153,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1104,
"end": 1106,
"ctxt": 0
},
"value": "M4",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1107,
"end": 1153,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 1113,
"end": 1151,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 1120,
"end": 1151,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 1125,
"end": 1130,
"ctxt": 0
},
"value": "Color",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1133,
"end": 1136,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1133,
"end": 1136,
"ctxt": 0
},
"value": "Red",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1138,
"end": 1143,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1138,
"end": 1143,
"ctxt": 0
},
"value": "Green",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1145,
"end": 1149,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1145,
"end": 1149,
"ctxt": 0
},
"value": "Blue",
"optional": false
},
"init": null
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 1154,
"end": 1210,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1161,
"end": 1163,
"ctxt": 0
},
"value": "M5",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1164,
"end": 1210,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 1170,
"end": 1208,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 1177,
"end": 1208,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 1182,
"end": 1187,
"ctxt": 0
},
"value": "Color",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1190,
"end": 1193,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1190,
"end": 1193,
"ctxt": 0
},
"value": "Red",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1195,
"end": 1200,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1195,
"end": 1200,
"ctxt": 0
},
"value": "Green",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1202,
"end": 1206,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1202,
"end": 1206,
"ctxt": 0
},
"value": "Blue",
"optional": false
},
"init": null
}
]
}
}
]
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 1212,
"end": 1270,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1219,
"end": 1221,
"ctxt": 0
},
"value": "M6",
"optional": false
},
"body": {
"type": "TsNamespaceDeclaration",
"span": {
"start": 1222,
"end": 1270,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1222,
"end": 1223,
"ctxt": 0
},
"value": "A",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1224,
"end": 1270,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 1230,
"end": 1268,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 1237,
"end": 1268,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 1242,
"end": 1247,
"ctxt": 0
},
"value": "Color",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1250,
"end": 1253,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1250,
"end": 1253,
"ctxt": 0
},
"value": "Red",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1255,
"end": 1260,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1255,
"end": 1260,
"ctxt": 0
},
"value": "Green",
"optional": false
},
"init": null
},
{
"type": "TsEnumMember",
"span": {
"start": 1262,
"end": 1266,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1262,
"end": 1266,
"ctxt": 0
},
"value": "Blue",
"optional": false
},
"init": null
}
]
}
}
]
}
}
},
{
"type": "TsModuleDeclaration",
"span": {
"start": 1271,
"end": 1402,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1278,
"end": 1280,
"ctxt": 0
},
"value": "M6",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1281,
"end": 1402,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 1287,
"end": 1351,
"ctxt": 0
},
"declaration": {
"type": "TsModuleDeclaration",
"span": {
"start": 1294,
"end": 1351,
"ctxt": 0
},
"declare": false,
"global": false,
"id": {
"type": "Identifier",
"span": {
"start": 1301,
"end": 1302,
"ctxt": 0
},
"value": "A",
"optional": false
},
"body": {
"type": "TsModuleBlock",
"span": {
"start": 1303,
"end": 1351,
"ctxt": 0
},
"body": [
{
"type": "ExportDeclaration",
"span": {
"start": 1313,
"end": 1345,
"ctxt": 0
},
"declaration": {
"type": "TsEnumDeclaration",
"span": {
"start": 1320,
"end": 1345,
"ctxt": 0
},
"declare": false,
"isConst": false,
"id": {
"type": "Identifier",
"span": {
"start": 1325,
"end": 1330,
"ctxt": 0
},
"value": "Color",
"optional": false
},
"members": [
{
"type": "TsEnumMember",
"span": {
"start": 1333,
"end": 1343,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1333,
"end": 1339,
"ctxt": 0
},
"value": "Yellow",
"optional": false
},
"init": {
"type": "NumericLiteral",
"span": {
"start": 1342,
"end": 1343,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
}
}
]
}
}
]
}
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 1356,
"end": 1379,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 1360,
"end": 1378,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 1360,
"end": 1361,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "MemberExpression",
"span": {
"start": 1364,
"end": 1378,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 1364,
"end": 1371,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1364,
"end": 1365,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1366,
"end": 1371,
"ctxt": 0
},
"value": "Color",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 1372,
"end": 1378,
"ctxt": 0
},
"value": "Yellow",
"optional": false
}
},
"definite": false
}
]
},
{
"type": "ExpressionStatement",
"span": {
"start": 1384,
"end": 1400,
"ctxt": 0
},
"expression": {
"type": "AssignmentExpression",
"span": {
"start": 1384,
"end": 1399,
"ctxt": 0
},
"operator": "=",
"left": {
"type": "Identifier",
"span": {
"start": 1384,
"end": 1385,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": null
},
"right": {
"type": "MemberExpression",
"span": {
"start": 1388,
"end": 1399,
"ctxt": 0
},
"object": {
"type": "MemberExpression",
"span": {
"start": 1388,
"end": 1395,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1388,
"end": 1389,
"ctxt": 0
},
"value": "A",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 1390,
"end": 1395,
"ctxt": 0
},
"value": "Color",
"optional": false
}
},
"property": {
"type": "Identifier",
"span": {
"start": 1396,
"end": 1399,
"ctxt": 0
},
"value": "Red",
"optional": false
}
}
}
}
]
}
}
],
"interpreter": null
}