swc/crates/swc_ecma_parser/tests/tsc/spreadDuplicateExact.json
2022-02-04 20:17:42 +09:00

1259 lines
33 KiB
JSON

{
"type": "Script",
"span": {
"start": 99,
"end": 705,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 99,
"end": 128,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 111,
"end": 127,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 111,
"end": 112,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 112,
"end": 127,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 114,
"end": 127,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 116,
"end": 125,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 116,
"end": 117,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 117,
"end": 125,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 119,
"end": 125,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 129,
"end": 159,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 141,
"end": 158,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 141,
"end": 142,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 142,
"end": 158,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 144,
"end": 158,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 146,
"end": 156,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 146,
"end": 147,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 148,
"end": 156,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 150,
"end": 156,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 160,
"end": 201,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 172,
"end": 200,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 172,
"end": 173,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 173,
"end": 200,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 175,
"end": 200,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 177,
"end": 198,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 177,
"end": 178,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 178,
"end": 198,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 180,
"end": 198,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 180,
"end": 186,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 189,
"end": 198,
"ctxt": 0
},
"kind": "undefined"
}
]
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 202,
"end": 244,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 214,
"end": 243,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 214,
"end": 215,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 215,
"end": 243,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 217,
"end": 243,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 219,
"end": 241,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 219,
"end": 220,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 221,
"end": 241,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 223,
"end": 241,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 223,
"end": 229,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 232,
"end": 241,
"ctxt": 0
},
"kind": "undefined"
}
]
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 246,
"end": 269,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 258,
"end": 268,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 258,
"end": 259,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 259,
"end": 268,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 261,
"end": 268,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 271,
"end": 297,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 275,
"end": 296,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 275,
"end": 277,
"ctxt": 0
},
"value": "a1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 280,
"end": 296,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 282,
"end": 283,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 285,
"end": 288,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 290,
"end": 293,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 293,
"end": 294,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 317,
"end": 343,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 321,
"end": 342,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 321,
"end": 323,
"ctxt": 0
},
"value": "b1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 326,
"end": 342,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 328,
"end": 329,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 331,
"end": 334,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 336,
"end": 339,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 339,
"end": 340,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 364,
"end": 390,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 368,
"end": 389,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 368,
"end": 370,
"ctxt": 0
},
"value": "c1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 373,
"end": 389,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 375,
"end": 376,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 378,
"end": 381,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 383,
"end": 386,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 386,
"end": 387,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 422,
"end": 448,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 426,
"end": 447,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 426,
"end": 428,
"ctxt": 0
},
"value": "d1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 431,
"end": 447,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 433,
"end": 434,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 436,
"end": 439,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 441,
"end": 444,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 444,
"end": 445,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 482,
"end": 519,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 486,
"end": 518,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 486,
"end": 488,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 491,
"end": 518,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 493,
"end": 494,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 496,
"end": 499,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 501,
"end": 504,
"ctxt": 0
},
"arguments": {
"type": "ParenthesisExpression",
"span": {
"start": 504,
"end": 516,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 505,
"end": 515,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 505,
"end": 506,
"ctxt": 0
},
"value": "t",
"optional": false
},
"consequent": {
"type": "Identifier",
"span": {
"start": 509,
"end": 510,
"ctxt": 0
},
"value": "a",
"optional": false
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 513,
"end": 515,
"ctxt": 0
},
"properties": []
}
}
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 540,
"end": 577,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 544,
"end": 576,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 544,
"end": 546,
"ctxt": 0
},
"value": "b2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 549,
"end": 576,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 551,
"end": 552,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 554,
"end": 557,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 559,
"end": 562,
"ctxt": 0
},
"arguments": {
"type": "ParenthesisExpression",
"span": {
"start": 562,
"end": 574,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 563,
"end": 573,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 563,
"end": 564,
"ctxt": 0
},
"value": "t",
"optional": false
},
"consequent": {
"type": "Identifier",
"span": {
"start": 567,
"end": 568,
"ctxt": 0
},
"value": "b",
"optional": false
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 571,
"end": 573,
"ctxt": 0
},
"properties": []
}
}
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 598,
"end": 635,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 602,
"end": 634,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 602,
"end": 604,
"ctxt": 0
},
"value": "c2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 607,
"end": 634,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 609,
"end": 610,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 612,
"end": 615,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 617,
"end": 620,
"ctxt": 0
},
"arguments": {
"type": "ParenthesisExpression",
"span": {
"start": 620,
"end": 632,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 621,
"end": 631,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 621,
"end": 622,
"ctxt": 0
},
"value": "t",
"optional": false
},
"consequent": {
"type": "Identifier",
"span": {
"start": 625,
"end": 626,
"ctxt": 0
},
"value": "c",
"optional": false
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 629,
"end": 631,
"ctxt": 0
},
"properties": []
}
}
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 668,
"end": 705,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 672,
"end": 704,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 672,
"end": 674,
"ctxt": 0
},
"value": "d2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 677,
"end": 704,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 679,
"end": 680,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 682,
"end": 685,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 687,
"end": 690,
"ctxt": 0
},
"arguments": {
"type": "ParenthesisExpression",
"span": {
"start": 690,
"end": 702,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 691,
"end": 701,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 691,
"end": 692,
"ctxt": 0
},
"value": "t",
"optional": false
},
"consequent": {
"type": "Identifier",
"span": {
"start": 695,
"end": 696,
"ctxt": 0
},
"value": "d",
"optional": false
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 699,
"end": 701,
"ctxt": 0
},
"properties": []
}
}
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}