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

2680 lines
74 KiB
JSON

{
"type": "Script",
"span": {
"start": 66,
"end": 796,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 75,
"end": 78,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 112,
"end": 116,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 112,
"end": 116,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 113,
"end": 116,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 115,
"end": 116,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 115,
"end": 116,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 66,
"end": 134,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 121,
"end": 134,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 123,
"end": 132,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 130,
"end": 131,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 78,
"end": 111,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 79,
"end": 110,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 79,
"end": 80,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": {
"type": "TsFunctionType",
"span": {
"start": 89,
"end": 110,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 90,
"end": 99,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 91,
"end": 99,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 93,
"end": 99,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 101,
"end": 110,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 104,
"end": 110,
"ctxt": 0
},
"kind": "string"
}
}
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 117,
"end": 120,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 119,
"end": 120,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 119,
"end": 120,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 136,
"end": 167,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 146,
"end": 147,
"ctxt": 0
},
"value": "I",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 148,
"end": 167,
"ctxt": 0
},
"body": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 154,
"end": 165,
"ctxt": 0
},
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 156,
"end": 164,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 158,
"end": 164,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 168,
"end": 177,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 172,
"end": 176,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 172,
"end": 173,
"ctxt": 0
},
"value": "i",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 173,
"end": 176,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 175,
"end": 176,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 175,
"end": 176,
"ctxt": 0
},
"value": "I",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 185,
"end": 186,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 179,
"end": 207,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 193,
"end": 205,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 193,
"end": 196,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 196,
"end": 204,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 198,
"end": 204,
"ctxt": 0
},
"kind": "string"
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 209,
"end": 231,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 213,
"end": 230,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 213,
"end": 214,
"ctxt": 0
},
"value": "a",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 214,
"end": 230,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 216,
"end": 230,
"ctxt": 0
},
"members": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 218,
"end": 228,
"ctxt": 0
},
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 220,
"end": 228,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 222,
"end": 228,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 232,
"end": 258,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 236,
"end": 257,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 236,
"end": 237,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 237,
"end": 257,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 239,
"end": 257,
"ctxt": 0
},
"members": [
{
"type": "TsConstructSignatureDeclaration",
"span": {
"start": 241,
"end": 255,
"ctxt": 0
},
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 247,
"end": 255,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 249,
"end": 255,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 259,
"end": 294,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 263,
"end": 293,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 263,
"end": 264,
"ctxt": 0
},
"value": "c",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 264,
"end": 293,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 266,
"end": 293,
"ctxt": 0
},
"members": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 268,
"end": 279,
"ctxt": 0
},
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 270,
"end": 278,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 272,
"end": 278,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 280,
"end": 291,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 281,
"end": 282,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 283,
"end": 291,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 285,
"end": 291,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 296,
"end": 319,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 300,
"end": 318,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 300,
"end": 302,
"ctxt": 0
},
"value": "r1",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 305,
"end": 318,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 305,
"end": 308,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 309,
"end": 317,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 310,
"end": 311,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
],
"body": {
"type": "Identifier",
"span": {
"start": 316,
"end": 317,
"ctxt": 0
},
"value": "x",
"optional": false
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 320,
"end": 351,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 324,
"end": 350,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 324,
"end": 326,
"ctxt": 0
},
"value": "r2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 329,
"end": 350,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 329,
"end": 332,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 333,
"end": 349,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 334,
"end": 343,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 335,
"end": 343,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 337,
"end": 343,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"body": {
"type": "Identifier",
"span": {
"start": 348,
"end": 349,
"ctxt": 0
},
"value": "x",
"optional": false
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 352,
"end": 392,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 356,
"end": 391,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 356,
"end": 358,
"ctxt": 0
},
"value": "r3",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 361,
"end": 391,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 361,
"end": 364,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 375,
"end": 376,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 375,
"end": 376,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": null
}
}
],
"decorators": [],
"span": {
"start": 365,
"end": 390,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 378,
"end": 390,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 380,
"end": 388,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 387,
"end": 388,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 393,
"end": 441,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 397,
"end": 440,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 397,
"end": 399,
"ctxt": 0
},
"value": "r4",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 402,
"end": 440,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 402,
"end": 405,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 416,
"end": 425,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 416,
"end": 425,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 417,
"end": 425,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 419,
"end": 425,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"decorators": [],
"span": {
"start": 406,
"end": 439,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 427,
"end": 439,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 429,
"end": 437,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 436,
"end": 437,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 442,
"end": 458,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 446,
"end": 457,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 446,
"end": 448,
"ctxt": 0
},
"value": "r5",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 451,
"end": 457,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 451,
"end": 454,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 455,
"end": 456,
"ctxt": 0
},
"value": "i",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 459,
"end": 475,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 463,
"end": 474,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 463,
"end": 465,
"ctxt": 0
},
"value": "r8",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 468,
"end": 474,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 468,
"end": 471,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 472,
"end": 473,
"ctxt": 0
},
"value": "c",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 477,
"end": 511,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 487,
"end": 489,
"ctxt": 0
},
"value": "I2",
"optional": false
},
"declare": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 489,
"end": 492,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 490,
"end": 491,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 490,
"end": 491,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
},
"extends": [],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 493,
"end": 511,
"ctxt": 0
},
"body": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 499,
"end": 509,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 500,
"end": 504,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 501,
"end": 504,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 503,
"end": 504,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 503,
"end": 504,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 505,
"end": 508,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 507,
"end": 508,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 507,
"end": 508,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 512,
"end": 531,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 516,
"end": 530,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 516,
"end": 518,
"ctxt": 0
},
"value": "i2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 518,
"end": 530,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 520,
"end": 530,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 520,
"end": 522,
"ctxt": 0
},
"value": "I2",
"optional": false
},
"typeParams": {
"type": "TsTypeParameterInstantiation",
"span": {
"start": 522,
"end": 530,
"ctxt": 0
},
"params": [
{
"type": "TsKeywordType",
"span": {
"start": 523,
"end": 529,
"ctxt": 0
},
"kind": "string"
}
]
}
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 539,
"end": 541,
"ctxt": 0
},
"value": "C2",
"optional": false
},
"declare": false,
"span": {
"start": 533,
"end": 560,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 551,
"end": 558,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 551,
"end": 554,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 554,
"end": 557,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 556,
"end": 557,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 556,
"end": 557,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"isStatic": false,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 541,
"end": 544,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 542,
"end": 543,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 542,
"end": 543,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
},
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 562,
"end": 587,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 566,
"end": 586,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 566,
"end": 568,
"ctxt": 0
},
"value": "a2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 568,
"end": 586,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 570,
"end": 586,
"ctxt": 0
},
"members": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 572,
"end": 584,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 576,
"end": 580,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 577,
"end": 580,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 579,
"end": 580,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 579,
"end": 580,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 581,
"end": 584,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 583,
"end": 584,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 583,
"end": 584,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 572,
"end": 575,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 573,
"end": 574,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 573,
"end": 574,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 588,
"end": 617,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 592,
"end": 616,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 592,
"end": 594,
"ctxt": 0
},
"value": "b2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 594,
"end": 616,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 596,
"end": 616,
"ctxt": 0
},
"members": [
{
"type": "TsConstructSignatureDeclaration",
"span": {
"start": 598,
"end": 614,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 606,
"end": 610,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 607,
"end": 610,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 609,
"end": 610,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 609,
"end": 610,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 611,
"end": 614,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 613,
"end": 614,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 613,
"end": 614,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 602,
"end": 605,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 603,
"end": 604,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 603,
"end": 604,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 618,
"end": 663,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 622,
"end": 662,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 622,
"end": 624,
"ctxt": 0
},
"value": "c2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 624,
"end": 662,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 626,
"end": 662,
"ctxt": 0
},
"members": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 628,
"end": 641,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 632,
"end": 636,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 633,
"end": 636,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 635,
"end": 636,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 635,
"end": 636,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 637,
"end": 640,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 639,
"end": 640,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 639,
"end": 640,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 628,
"end": 631,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 629,
"end": 630,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 629,
"end": 630,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
}
},
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 642,
"end": 660,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 646,
"end": 650,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 647,
"end": 650,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 649,
"end": 650,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 649,
"end": 650,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 652,
"end": 656,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 653,
"end": 656,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 655,
"end": 656,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 655,
"end": 656,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 657,
"end": 660,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 659,
"end": 660,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 659,
"end": 660,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 642,
"end": 645,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 643,
"end": 644,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 643,
"end": 644,
"ctxt": 0
},
"value": "T",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 665,
"end": 712,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 669,
"end": 711,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 669,
"end": 671,
"ctxt": 0
},
"value": "r9",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 674,
"end": 711,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 674,
"end": 677,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "FunctionExpression",
"identifier": null,
"params": [
{
"type": "Parameter",
"span": {
"start": 691,
"end": 695,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 691,
"end": 695,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 692,
"end": 695,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 694,
"end": 695,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 694,
"end": 695,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 678,
"end": 710,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 697,
"end": 710,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 699,
"end": 708,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 706,
"end": 707,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 687,
"end": 690,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 688,
"end": 689,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 688,
"end": 689,
"ctxt": 0
},
"value": "U",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": null,
"default": null
}
]
},
"returnType": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 713,
"end": 758,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 717,
"end": 757,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 717,
"end": 720,
"ctxt": 0
},
"value": "r10",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 723,
"end": 757,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 723,
"end": 726,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 727,
"end": 756,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 746,
"end": 750,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 747,
"end": 750,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 749,
"end": 750,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 749,
"end": 750,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
}
],
"body": {
"type": "Identifier",
"span": {
"start": 755,
"end": 756,
"ctxt": 0
},
"value": "x",
"optional": false
},
"async": false,
"generator": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 727,
"end": 745,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 728,
"end": 744,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 728,
"end": 729,
"ctxt": 0
},
"value": "U",
"optional": false
},
"in": false,
"out": false,
"const": false,
"constraint": {
"type": "TsKeywordType",
"span": {
"start": 738,
"end": 744,
"ctxt": 0
},
"kind": "string"
},
"default": null
}
]
},
"returnType": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 759,
"end": 777,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 763,
"end": 776,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 763,
"end": 766,
"ctxt": 0
},
"value": "r12",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 769,
"end": 776,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 769,
"end": 772,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 773,
"end": 775,
"ctxt": 0
},
"value": "i2",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 778,
"end": 796,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 782,
"end": 795,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 782,
"end": 785,
"ctxt": 0
},
"value": "r15",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 788,
"end": 795,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 788,
"end": 791,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 792,
"end": 794,
"ctxt": 0
},
"value": "c2",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
}
],
"interpreter": null
}