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

2345 lines
60 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 107,
"end": 851,
"ctxt": 0
},
"body": [
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 116,
"end": 119,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 140,
"end": 144,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 140,
"end": 144,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 141,
"end": 144,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 143,
"end": 144,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 143,
"end": 144,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 107,
"end": 162,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 149,
"end": 162,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 151,
"end": 160,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 158,
"end": 159,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 119,
"end": 139,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 120,
"end": 138,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 120,
"end": 121,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 130,
"end": 138,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 130,
"end": 138,
"ctxt": 0
},
"value": "Function",
"optional": false
},
"typeParams": null
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 145,
"end": 148,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 147,
"end": 148,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 147,
"end": 148,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 166,
"end": 173,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 166,
"end": 172,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 166,
"end": 169,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 170,
"end": 171,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 175,
"end": 193,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 175,
"end": 192,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 175,
"end": 178,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 179,
"end": 188,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 185,
"end": 188,
"ctxt": 0
},
"stmts": []
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
},
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 190,
"end": 191,
"ctxt": 0
},
"value": 1.0
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 195,
"end": 213,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 195,
"end": 212,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 195,
"end": 198,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NumericLiteral",
"span": {
"start": 199,
"end": 200,
"ctxt": 0
},
"value": 1.0
}
},
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 202,
"end": 211,
"ctxt": 0
},
"params": [],
"body": {
"type": "BlockStatement",
"span": {
"start": 208,
"end": 211,
"ctxt": 0
},
"stmts": []
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
}
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 226,
"end": 230,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 264,
"end": 268,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 264,
"end": 268,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 265,
"end": 268,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 267,
"end": 268,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 267,
"end": 268,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 217,
"end": 286,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 273,
"end": 286,
"ctxt": 0
},
"stmts": [
{
"type": "ReturnStatement",
"span": {
"start": 275,
"end": 284,
"ctxt": 0
},
"argument": {
"type": "Identifier",
"span": {
"start": 282,
"end": 283,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 230,
"end": 263,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 231,
"end": 262,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 231,
"end": 232,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": {
"type": "TsFunctionType",
"span": {
"start": 241,
"end": 262,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 242,
"end": 251,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 243,
"end": 251,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 245,
"end": 251,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeParams": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 253,
"end": 262,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 256,
"end": 262,
"ctxt": 0
},
"kind": "string"
}
}
},
"default": null
}
]
},
"returnType": {
"type": "TsTypeAnnotation",
"span": {
"start": 269,
"end": 272,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 271,
"end": 272,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 271,
"end": 272,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 296,
"end": 297,
"ctxt": 0
},
"value": "C",
"optional": false
},
"declare": false,
"span": {
"start": 290,
"end": 320,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 305,
"end": 317,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 305,
"end": 308,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 308,
"end": 316,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 310,
"end": 316,
"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": 324,
"end": 359,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 328,
"end": 358,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 328,
"end": 329,
"ctxt": 0
},
"value": "b",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 329,
"end": 358,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 331,
"end": 358,
"ctxt": 0
},
"members": [
{
"type": "TsConstructSignatureDeclaration",
"span": {
"start": 333,
"end": 356,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 338,
"end": 347,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 339,
"end": 347,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 341,
"end": 347,
"ctxt": 0
},
"kind": "string"
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 348,
"end": 356,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 350,
"end": 356,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 369,
"end": 371,
"ctxt": 0
},
"value": "C2",
"optional": false
},
"declare": false,
"span": {
"start": 363,
"end": 392,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassProperty",
"span": {
"start": 382,
"end": 389,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 382,
"end": 385,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"value": null,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 385,
"end": 388,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 387,
"end": 388,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 387,
"end": 388,
"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": 371,
"end": 374,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 372,
"end": 373,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 372,
"end": 373,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"superTypeParams": null,
"implements": []
},
{
"type": "VariableDeclaration",
"span": {
"start": 396,
"end": 425,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 400,
"end": 424,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 400,
"end": 402,
"ctxt": 0
},
"value": "b2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 402,
"end": 424,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeLiteral",
"span": {
"start": 404,
"end": 424,
"ctxt": 0
},
"members": [
{
"type": "TsConstructSignatureDeclaration",
"span": {
"start": 406,
"end": 422,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 414,
"end": 418,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 415,
"end": 418,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 417,
"end": 418,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 417,
"end": 418,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 419,
"end": 422,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 421,
"end": 422,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 421,
"end": 422,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
},
"typeParams": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 410,
"end": 413,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 411,
"end": 412,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 411,
"end": 412,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": null,
"default": null
}
]
}
}
]
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 429,
"end": 458,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 433,
"end": 457,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 433,
"end": 434,
"ctxt": 0
},
"value": "r",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 437,
"end": 457,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 437,
"end": 441,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "NewExpression",
"span": {
"start": 442,
"end": 456,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 446,
"end": 454,
"ctxt": 0
},
"value": "Function",
"optional": false
},
"arguments": [],
"typeArguments": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 460,
"end": 494,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 464,
"end": 493,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 464,
"end": 466,
"ctxt": 0
},
"value": "r2",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 469,
"end": 493,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 469,
"end": 473,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 474,
"end": 492,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 475,
"end": 486,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 476,
"end": 486,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsArrayType",
"span": {
"start": 478,
"end": 486,
"ctxt": 0
},
"elemType": {
"type": "TsKeywordType",
"span": {
"start": 478,
"end": 484,
"ctxt": 0
},
"kind": "string"
}
}
}
}
],
"body": {
"type": "Identifier",
"span": {
"start": 491,
"end": 492,
"ctxt": 0
},
"value": "x",
"optional": false
},
"async": false,
"generator": false,
"typeParameters": null,
"returnType": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 496,
"end": 513,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 500,
"end": 512,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 500,
"end": 502,
"ctxt": 0
},
"value": "r6",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 505,
"end": 512,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 505,
"end": 509,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 510,
"end": 511,
"ctxt": 0
},
"value": "C",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 515,
"end": 532,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 519,
"end": 531,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 519,
"end": 521,
"ctxt": 0
},
"value": "r7",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 524,
"end": 531,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 524,
"end": 528,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 529,
"end": 530,
"ctxt": 0
},
"value": "b",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 534,
"end": 564,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 538,
"end": 563,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 538,
"end": 540,
"ctxt": 0
},
"value": "r8",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 543,
"end": 563,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 543,
"end": 547,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 548,
"end": 562,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 552,
"end": 556,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 553,
"end": 556,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 555,
"end": 556,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 555,
"end": 556,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
}
],
"body": {
"type": "Identifier",
"span": {
"start": 561,
"end": 562,
"ctxt": 0
},
"value": "x",
"optional": false
},
"async": false,
"generator": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 548,
"end": 551,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 549,
"end": 550,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 549,
"end": 550,
"ctxt": 0
},
"value": "U",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"returnType": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 587,
"end": 627,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 591,
"end": 626,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 591,
"end": 594,
"ctxt": 0
},
"value": "r11",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 597,
"end": 626,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 597,
"end": 601,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "ArrowFunctionExpression",
"span": {
"start": 602,
"end": 625,
"ctxt": 0
},
"params": [
{
"type": "Identifier",
"span": {
"start": 609,
"end": 613,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 610,
"end": 613,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 612,
"end": 613,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 612,
"end": 613,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
},
{
"type": "Identifier",
"span": {
"start": 615,
"end": 619,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 616,
"end": 619,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 618,
"end": 619,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 618,
"end": 619,
"ctxt": 0
},
"value": "V",
"optional": false
},
"typeParams": null
}
}
}
],
"body": {
"type": "Identifier",
"span": {
"start": 624,
"end": 625,
"ctxt": 0
},
"value": "x",
"optional": false
},
"async": false,
"generator": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 602,
"end": 608,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 603,
"end": 604,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 603,
"end": 604,
"ctxt": 0
},
"value": "U",
"optional": false
},
"constraint": null,
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 606,
"end": 607,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 606,
"end": 607,
"ctxt": 0
},
"value": "V",
"optional": false
},
"constraint": null,
"default": null
}
]
},
"returnType": null
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 629,
"end": 648,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 633,
"end": 647,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 633,
"end": 636,
"ctxt": 0
},
"value": "r13",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 639,
"end": 647,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 639,
"end": 643,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 644,
"end": 646,
"ctxt": 0
},
"value": "C2",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 650,
"end": 669,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 654,
"end": 668,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 654,
"end": 657,
"ctxt": 0
},
"value": "r14",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 660,
"end": 668,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 660,
"end": 664,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 665,
"end": 667,
"ctxt": 0
},
"value": "b2",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "TsInterfaceDeclaration",
"span": {
"start": 673,
"end": 719,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 683,
"end": 685,
"ctxt": 0
},
"value": "F2",
"optional": false
},
"declare": false,
"typeParams": null,
"extends": [
{
"type": "TsExpressionWithTypeArguments",
"span": {
"start": 694,
"end": 702,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 694,
"end": 702,
"ctxt": 0
},
"value": "Function",
"optional": false
},
"typeArguments": null
}
],
"body": {
"type": "TsInterfaceBody",
"span": {
"start": 703,
"end": 719,
"ctxt": 0
},
"body": [
{
"type": "TsPropertySignature",
"span": {
"start": 705,
"end": 717,
"ctxt": 0
},
"readonly": false,
"key": {
"type": "Identifier",
"span": {
"start": 705,
"end": 708,
"ctxt": 0
},
"value": "foo",
"optional": false
},
"computed": false,
"optional": false,
"init": null,
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 708,
"end": 716,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 710,
"end": 716,
"ctxt": 0
},
"kind": "string"
}
},
"typeParams": null
}
]
}
},
{
"type": "VariableDeclaration",
"span": {
"start": 721,
"end": 732,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 725,
"end": 731,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 725,
"end": 727,
"ctxt": 0
},
"value": "f2",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 727,
"end": 731,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 729,
"end": 731,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 729,
"end": 731,
"ctxt": 0
},
"value": "F2",
"optional": false
},
"typeParams": null
}
}
},
"init": null,
"definite": false
}
]
},
{
"type": "VariableDeclaration",
"span": {
"start": 734,
"end": 753,
"ctxt": 0
},
"kind": "var",
"declare": false,
"declarations": [
{
"type": "VariableDeclarator",
"span": {
"start": 738,
"end": 752,
"ctxt": 0
},
"id": {
"type": "Identifier",
"span": {
"start": 738,
"end": 741,
"ctxt": 0
},
"value": "r16",
"optional": false,
"typeAnnotation": null
},
"init": {
"type": "CallExpression",
"span": {
"start": 744,
"end": 752,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 744,
"end": 748,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 749,
"end": 751,
"ctxt": 0
},
"value": "f2",
"optional": false
}
}
],
"typeArguments": null
},
"definite": false
}
]
},
{
"type": "FunctionDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 766,
"end": 769,
"ctxt": 0
},
"value": "fff",
"optional": false
},
"declare": false,
"params": [
{
"type": "Parameter",
"span": {
"start": 807,
"end": 811,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 807,
"end": 811,
"ctxt": 0
},
"value": "x",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 808,
"end": 811,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 810,
"end": 811,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 810,
"end": 811,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
}
}
}
},
{
"type": "Parameter",
"span": {
"start": 813,
"end": 817,
"ctxt": 0
},
"decorators": [],
"pat": {
"type": "Identifier",
"span": {
"start": 813,
"end": 817,
"ctxt": 0
},
"value": "y",
"optional": false,
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 814,
"end": 817,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsTypeReference",
"span": {
"start": 816,
"end": 817,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 816,
"end": 817,
"ctxt": 0
},
"value": "U",
"optional": false
},
"typeParams": null
}
}
}
}
],
"decorators": [],
"span": {
"start": 757,
"end": 851,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 819,
"end": 851,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 826,
"end": 834,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 826,
"end": 833,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 826,
"end": 830,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 831,
"end": 832,
"ctxt": 0
},
"value": "x",
"optional": false
}
}
],
"typeArguments": null
}
},
{
"type": "ExpressionStatement",
"span": {
"start": 840,
"end": 848,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 840,
"end": 847,
"ctxt": 0
},
"callee": {
"type": "Identifier",
"span": {
"start": 840,
"end": 844,
"ctxt": 0
},
"value": "foo2",
"optional": false
},
"arguments": [
{
"spread": null,
"expression": {
"type": "Identifier",
"span": {
"start": 845,
"end": 846,
"ctxt": 0
},
"value": "y",
"optional": false
}
}
],
"typeArguments": null
}
}
]
},
"generator": false,
"async": false,
"typeParameters": {
"type": "TsTypeParameterDeclaration",
"span": {
"start": 769,
"end": 806,
"ctxt": 0
},
"parameters": [
{
"type": "TsTypeParameter",
"span": {
"start": 770,
"end": 792,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 770,
"end": 771,
"ctxt": 0
},
"value": "T",
"optional": false
},
"constraint": {
"type": "TsTypeLiteral",
"span": {
"start": 780,
"end": 792,
"ctxt": 0
},
"members": [
{
"type": "TsCallSignatureDeclaration",
"span": {
"start": 782,
"end": 790,
"ctxt": 0
},
"params": [],
"typeAnnotation": {
"type": "TsTypeAnnotation",
"span": {
"start": 784,
"end": 790,
"ctxt": 0
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 786,
"end": 790,
"ctxt": 0
},
"kind": "void"
}
},
"typeParams": null
}
]
},
"default": null
},
{
"type": "TsTypeParameter",
"span": {
"start": 794,
"end": 805,
"ctxt": 0
},
"name": {
"type": "Identifier",
"span": {
"start": 794,
"end": 795,
"ctxt": 0
},
"value": "U",
"optional": false
},
"constraint": {
"type": "TsTypeReference",
"span": {
"start": 804,
"end": 805,
"ctxt": 0
},
"typeName": {
"type": "Identifier",
"span": {
"start": 804,
"end": 805,
"ctxt": 0
},
"value": "T",
"optional": false
},
"typeParams": null
},
"default": null
}
]
},
"returnType": null
}
],
"interpreter": null
}