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

907 lines
27 KiB
JSON

{
"type": "Script",
"span": {
"start": 138,
"end": 410,
"ctxt": 0
},
"body": [
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 138,
"end": 242,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 148,
"end": 149,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 150,
"end": 242,
"ctxt": 0
},
"body": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 157,
"end": 169,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 160,
"end": 168,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 162,
"end": 168,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 175,
"end": 192,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 176,
"end": 182,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 177,
"end": 182,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 179,
"end": 182,
"ctxt": 0
},
"kind": "any"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 183,
"end": 191,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 185,
"end": 191,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 198,
"end": 211,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 202,
"end": 206,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 203,
"end": 206,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 205,
"end": 206,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 205,
"end": 206,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 207,
"end": 210,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 209,
"end": 210,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 209,
"end": 210,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 198,
"end": 201,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 199,
"end": 200,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 199,
"end": 200,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
}
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 217,
"end": 230,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 221,
"end": 225,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 222,
"end": 225,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 224,
"end": 225,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 224,
"end": 225,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 226,
"end": 229,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 228,
"end": 229,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 228,
"end": 229,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 217,
"end": 220,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 218,
"end": 219,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 218,
"end": 219,
"ctxt": 0
},
"value": "U",
"optional": false
},
"constraint": null,
"default": null
}
]
}
}
]
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 246,
"end": 307,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 256,
"end": 258,
"ctxt": 0
},
"value": "I2",
"optional": false
},
"declare": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 258,
"end": 261,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 259,
"end": 260,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 259,
"end": 260,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 262,
"end": 307,
"ctxt": 0
},
"body": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 269,
"end": 279,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 270,
"end": 274,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 271,
"end": 274,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 273,
"end": 274,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 273,
"end": 274,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 275,
"end": 278,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 277,
"end": 278,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 277,
"end": 278,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 285,
"end": 295,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 286,
"end": 290,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 287,
"end": 290,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 289,
"end": 290,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 289,
"end": 290,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 291,
"end": 294,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 293,
"end": 294,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 293,
"end": 294,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 311,
"end": 410,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 315,
"end": 410,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 315,
"end": 316,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 316,
"end": 410,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 318,
"end": 410,
"ctxt": 0
},
"members": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 325,
"end": 337,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 326,
"end": 327,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 328,
"end": 336,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 330,
"end": 336,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 343,
"end": 360,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 344,
"end": 350,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 345,
"end": 350,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 347,
"end": 350,
"ctxt": 0
},
"kind": "any"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 351,
"end": 359,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 353,
"end": 359,
"ctxt": 0
},
"kind": "number"
}
},
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 366,
"end": 379,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 370,
"end": 374,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 371,
"end": 374,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 373,
"end": 374,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 373,
"end": 374,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 375,
"end": 378,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 377,
"end": 378,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 377,
"end": 378,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 366,
"end": 369,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 367,
"end": 368,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 367,
"end": 368,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
}
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 385,
"end": 398,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 389,
"end": 393,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 390,
"end": 393,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 392,
"end": 393,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 392,
"end": 393,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 394,
"end": 397,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 396,
"end": 397,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 396,
"end": 397,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 385,
"end": 388,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 386,
"end": 387,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 386,
"end": 387,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
}
}
]
}
}
},
"init": null,
"definite": false
}
]
}
],
"interpreter": null
}