{ "type": "Script", "span": { "start": 188, "end": 286, "ctxt": 0 }, "body": [ { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 205, "end": 208, "ctxt": 0 }, "value": "foo", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 238, "end": 242, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 238, "end": 242, "ctxt": 0 }, "value": "y", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 239, "end": 242, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 241, "end": 242, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 241, "end": 242, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } } ], "decorators": [], "span": { "start": 188, "end": 247, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": { "type": "TsTypeParameterDeclaration", "span": { "start": 208, "end": 237, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 209, "end": 210, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 209, "end": 210, "ctxt": 0 }, "value": "Z", "optional": false }, "constraint": null, "default": null }, { "type": "TsTypeParameter", "span": { "start": 212, "end": 236, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 212, "end": 213, "ctxt": 0 }, "value": "T", "optional": false }, "constraint": { "type": "TsFunctionType", "span": { "start": 222, "end": 236, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 226, "end": 230, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 227, "end": 230, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 229, "end": 230, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 229, "end": 230, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } } } ], "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 222, "end": 225, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 223, "end": 224, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 223, "end": 224, "ctxt": 0 }, "value": "U", "optional": false }, "constraint": null, "default": null } ] }, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 232, "end": 236, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 235, "end": 236, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 235, "end": 236, "ctxt": 0 }, "value": "Z", "optional": false }, "typeParams": null } } }, "default": null } ] }, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 243, "end": 246, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 245, "end": 246, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 245, "end": 246, "ctxt": 0 }, "value": "Z", "optional": false }, "typeParams": null } } }, { "type": "VariableDeclaration", "span": { "start": 248, "end": 259, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 252, "end": 258, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 252, "end": 253, "ctxt": 0 }, "value": "a", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 253, "end": 258, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 255, "end": 258, "ctxt": 0 }, "kind": "any" } } }, "init": null, "definite": false } ] }, { "type": "ExpressionStatement", "span": { "start": 261, "end": 268, "ctxt": 0 }, "expression": { "type": "CallExpression", "span": { "start": 261, "end": 267, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { "start": 261, "end": 264, "ctxt": 0 }, "value": "foo", "optional": false }, "arguments": [ { "spread": null, "expression": { "type": "Identifier", "span": { "start": 265, "end": 266, "ctxt": 0 }, "value": "a", "optional": false } } ], "typeArguments": null } }, { "type": "ExpressionStatement", "span": { "start": 269, "end": 286, "ctxt": 0 }, "expression": { "type": "CallExpression", "span": { "start": 269, "end": 285, "ctxt": 0 }, "callee": { "type": "Identifier", "span": { "start": 269, "end": 272, "ctxt": 0 }, "value": "foo", "optional": false }, "arguments": [ { "spread": null, "expression": { "type": "Identifier", "span": { "start": 283, "end": 284, "ctxt": 0 }, "value": "a", "optional": false } } ], "typeArguments": { "type": "TsTypeParameterInstantiation", "span": { "start": 272, "end": 282, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 273, "end": 276, "ctxt": 0 }, "kind": "any" }, { "type": "TsKeywordType", "span": { "start": 278, "end": 281, "ctxt": 0 }, "kind": "any" } ] } } } ], "interpreter": null }