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

1259 lines
33 KiB
JSON

{
"type": "Script",
"span": {
"start": 62,
"end": 644,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 62,
"end": 91,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 74,
"end": 90,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 74,
"end": 75,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 75,
"end": 90,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 77,
"end": 90,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 79,
"end": 88,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 79,
"end": 80,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 80,
"end": 88,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 82,
"end": 88,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 92,
"end": 122,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 104,
"end": 121,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 104,
"end": 105,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 105,
"end": 121,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 107,
"end": 121,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 109,
"end": 119,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 109,
"end": 110,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 111,
"end": 119,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 113,
"end": 119,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 123,
"end": 164,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 135,
"end": 163,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 135,
"end": 136,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 136,
"end": 163,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 138,
"end": 163,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 140,
"end": 161,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 140,
"end": 141,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 141,
"end": 161,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 143,
"end": 161,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 143,
"end": 149,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 152,
"end": 161,
"ctxt": 0
},
"kind": "undefined"
}
]
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 165,
"end": 207,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 177,
"end": 206,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 177,
"end": 178,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 178,
"end": 206,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 180,
"end": 206,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 182,
"end": 204,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 182,
"end": 183,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 184,
"end": 204,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 186,
"end": 204,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 186,
"end": 192,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 195,
"end": 204,
"ctxt": 0
},
"kind": "undefined"
}
]
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 209,
"end": 232,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 221,
"end": 231,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 221,
"end": 222,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 222,
"end": 231,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 224,
"end": 231,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 234,
"end": 260,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 238,
"end": 259,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 238,
"end": 240,
"ctxt": 0
},
"value": "a1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 243,
"end": 259,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 245,
"end": 246,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 248,
"end": 251,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 253,
"end": 256,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 256,
"end": 257,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 280,
"end": 306,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 284,
"end": 305,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 284,
"end": 286,
"ctxt": 0
},
"value": "b1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 289,
"end": 305,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 291,
"end": 292,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 294,
"end": 297,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 299,
"end": 302,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 302,
"end": 303,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 327,
"end": 353,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 331,
"end": 352,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 331,
"end": 333,
"ctxt": 0
},
"value": "c1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 336,
"end": 352,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 338,
"end": 339,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 341,
"end": 344,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 346,
"end": 349,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 349,
"end": 350,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 385,
"end": 411,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 389,
"end": 410,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 389,
"end": 391,
"ctxt": 0
},
"value": "d1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 394,
"end": 410,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 396,
"end": 397,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 399,
"end": 402,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 404,
"end": 407,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 407,
"end": 408,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 433,
"end": 470,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 437,
"end": 469,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 437,
"end": 439,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 442,
"end": 469,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 444,
"end": 445,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 447,
"end": 450,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 452,
"end": 455,
"ctxt": 0
},
"arguments": {
"type": "ParenthesisExpression",
"span": {
"start": 455,
"end": 467,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 456,
"end": 466,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 456,
"end": 457,
"ctxt": 0
},
"value": "t",
"optional": false
},
"consequent": {
"type": "Identifier",
"span": {
"start": 460,
"end": 461,
"ctxt": 0
},
"value": "a",
"optional": false
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 464,
"end": 466,
"ctxt": 0
},
"properties": []
}
}
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 491,
"end": 528,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 495,
"end": 527,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 495,
"end": 497,
"ctxt": 0
},
"value": "b2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 500,
"end": 527,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 502,
"end": 503,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 505,
"end": 508,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 510,
"end": 513,
"ctxt": 0
},
"arguments": {
"type": "ParenthesisExpression",
"span": {
"start": 513,
"end": 525,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 514,
"end": 524,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 514,
"end": 515,
"ctxt": 0
},
"value": "t",
"optional": false
},
"consequent": {
"type": "Identifier",
"span": {
"start": 518,
"end": 519,
"ctxt": 0
},
"value": "b",
"optional": false
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 522,
"end": 524,
"ctxt": 0
},
"properties": []
}
}
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 549,
"end": 586,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 553,
"end": 585,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 553,
"end": 555,
"ctxt": 0
},
"value": "c2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 558,
"end": 585,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 560,
"end": 561,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 563,
"end": 566,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 568,
"end": 571,
"ctxt": 0
},
"arguments": {
"type": "ParenthesisExpression",
"span": {
"start": 571,
"end": 583,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 572,
"end": 582,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 572,
"end": 573,
"ctxt": 0
},
"value": "t",
"optional": false
},
"consequent": {
"type": "Identifier",
"span": {
"start": 576,
"end": 577,
"ctxt": 0
},
"value": "c",
"optional": false
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 580,
"end": 582,
"ctxt": 0
},
"properties": []
}
}
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 607,
"end": 644,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 611,
"end": 643,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 611,
"end": 613,
"ctxt": 0
},
"value": "d2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 616,
"end": 643,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 618,
"end": 619,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 621,
"end": 624,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 626,
"end": 629,
"ctxt": 0
},
"arguments": {
"type": "ParenthesisExpression",
"span": {
"start": 629,
"end": 641,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 630,
"end": 640,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 630,
"end": 631,
"ctxt": 0
},
"value": "t",
"optional": false
},
"consequent": {
"type": "Identifier",
"span": {
"start": 634,
"end": 635,
"ctxt": 0
},
"value": "d",
"optional": false
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 638,
"end": 640,
"ctxt": 0
},
"properties": []
}
}
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}