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

1259 lines
33 KiB
JSON

{
"type": "Script",
"span": {
"start": 67,
"end": 664,
"ctxt": 0
},
"body": [
{
"type": "VariableDeclaration",
"span": {
"start": 67,
"end": 96,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 79,
"end": 95,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 79,
"end": 80,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 80,
"end": 95,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 82,
"end": 95,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 84,
"end": 93,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 84,
"end": 85,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 85,
"end": 93,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 87,
"end": 93,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 98,
"end": 128,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 110,
"end": 127,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 110,
"end": 111,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 111,
"end": 127,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 113,
"end": 127,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 115,
"end": 125,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 115,
"end": 116,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": true,
"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": 130,
"end": 171,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 142,
"end": 170,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 142,
"end": 143,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 143,
"end": 170,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 145,
"end": 170,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 147,
"end": 168,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 147,
"end": 148,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 148,
"end": 168,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 150,
"end": 168,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 150,
"end": 156,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 159,
"end": 168,
"ctxt": 0
},
"kind": "undefined"
}
]
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 173,
"end": 215,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 185,
"end": 214,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 185,
"end": 186,
"ctxt": 0
},
"value": "d",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 186,
"end": 214,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 188,
"end": 214,
"ctxt": 0
},
"members": [
{
"type": "TsPropertySignature",
"span": {
"start": 190,
"end": 212,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 190,
"end": 191,
"ctxt": 0
},
"value": "a",
"optional": false
},
"computed": false,
"optional": true,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 192,
"end": 212,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsUnionType",
"span": {
"start": 194,
"end": 212,
"ctxt": 0
},
"types": [
{
"type": "TsKeywordType",
"span": {
"start": 194,
"end": 200,
"ctxt": 0
},
"kind": "string"
},
{
"type": "TsKeywordType",
"span": {
"start": 203,
"end": 212,
"ctxt": 0
},
"kind": "undefined"
}
]
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 219,
"end": 242,
"ctxt": 0
},
"kind": "let",
"declare": true,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 231,
"end": 241,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 231,
"end": 232,
"ctxt": 0
},
"value": "t",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 232,
"end": 241,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 234,
"end": 241,
"ctxt": 0
},
"kind": "boolean"
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 246,
"end": 272,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 250,
"end": 271,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 250,
"end": 252,
"ctxt": 0
},
"value": "a1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 255,
"end": 271,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 257,
"end": 258,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 260,
"end": 263,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 265,
"end": 268,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 268,
"end": 269,
"ctxt": 0
},
"value": "a",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 293,
"end": 319,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 297,
"end": 318,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 297,
"end": 299,
"ctxt": 0
},
"value": "b1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 302,
"end": 318,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 304,
"end": 305,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 307,
"end": 310,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 312,
"end": 315,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 315,
"end": 316,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 341,
"end": 367,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 345,
"end": 366,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 345,
"end": 347,
"ctxt": 0
},
"value": "c1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 350,
"end": 366,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 352,
"end": 353,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 355,
"end": 358,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 360,
"end": 363,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 363,
"end": 364,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 400,
"end": 426,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 404,
"end": 425,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 404,
"end": 406,
"ctxt": 0
},
"value": "d1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 409,
"end": 425,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 411,
"end": 412,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 414,
"end": 417,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 419,
"end": 422,
"ctxt": 0
},
"arguments": {
"type": "Identifier",
"span": {
"start": 422,
"end": 423,
"ctxt": 0
},
"value": "d",
"optional": false
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 450,
"end": 487,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 454,
"end": 486,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 454,
"end": 456,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 459,
"end": 486,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 461,
"end": 462,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 464,
"end": 467,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 469,
"end": 472,
"ctxt": 0
},
"arguments": {
"type": "ParenthesisExpression",
"span": {
"start": 472,
"end": 484,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 473,
"end": 483,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 473,
"end": 474,
"ctxt": 0
},
"value": "t",
"optional": false
},
"consequent": {
"type": "Identifier",
"span": {
"start": 477,
"end": 478,
"ctxt": 0
},
"value": "a",
"optional": false
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 481,
"end": 483,
"ctxt": 0
},
"properties": []
}
}
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 509,
"end": 546,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 513,
"end": 545,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 513,
"end": 515,
"ctxt": 0
},
"value": "b2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 518,
"end": 545,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 520,
"end": 521,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 523,
"end": 526,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 528,
"end": 531,
"ctxt": 0
},
"arguments": {
"type": "ParenthesisExpression",
"span": {
"start": 531,
"end": 543,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 532,
"end": 542,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 532,
"end": 533,
"ctxt": 0
},
"value": "t",
"optional": false
},
"consequent": {
"type": "Identifier",
"span": {
"start": 536,
"end": 537,
"ctxt": 0
},
"value": "b",
"optional": false
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 540,
"end": 542,
"ctxt": 0
},
"properties": []
}
}
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 568,
"end": 605,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 572,
"end": 604,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 572,
"end": 574,
"ctxt": 0
},
"value": "c2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 577,
"end": 604,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 579,
"end": 580,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 582,
"end": 585,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 587,
"end": 590,
"ctxt": 0
},
"arguments": {
"type": "ParenthesisExpression",
"span": {
"start": 590,
"end": 602,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 591,
"end": 601,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 591,
"end": 592,
"ctxt": 0
},
"value": "t",
"optional": false
},
"consequent": {
"type": "Identifier",
"span": {
"start": 595,
"end": 596,
"ctxt": 0
},
"value": "c",
"optional": false
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 599,
"end": 601,
"ctxt": 0
},
"properties": []
}
}
}
}
]
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 627,
"end": 664,
"ctxt": 0
},
"kind": "let",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 631,
"end": 663,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 631,
"end": 633,
"ctxt": 0
},
"value": "d2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "ObjectExpression",
"span": {
"start": 636,
"end": 663,
"ctxt": 0
},
"properties": [
{
"type": "KeyValueProperty",
"key": {
"type": "Identifier",
"span": {
"start": 638,
"end": 639,
"ctxt": 0
},
"value": "a",
"optional": false
},
"value": {
"type": "NumericLiteral",
"span": {
"start": 641,
"end": 644,
"ctxt": 0
},
"value": 123.0
}
},
{
"type": "SpreadElement",
"spread": {
"start": 646,
"end": 649,
"ctxt": 0
},
"arguments": {
"type": "ParenthesisExpression",
"span": {
"start": 649,
"end": 661,
"ctxt": 0
},
"expression": {
"type": "ConditionalExpression",
"span": {
"start": 650,
"end": 660,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 650,
"end": 651,
"ctxt": 0
},
"value": "t",
"optional": false
},
"consequent": {
"type": "Identifier",
"span": {
"start": 654,
"end": 655,
"ctxt": 0
},
"value": "d",
"optional": false
},
"alternate": {
"type": "ObjectExpression",
"span": {
"start": 658,
"end": 660,
"ctxt": 0
},
"properties": []
}
}
}
}
]
},
"definite": false
}
]
}
],
"interpreter": null
}