{ "type": "Script", "span": { "start": 2, "end": 2545, "ctxt": 0 }, "body": [ { "type": "TsModuleDeclaration", "span": { "start": 2, "end": 257, "ctxt": 0 }, "declare": false, "global": false, "id": { "type": "Identifier", "span": { "start": 9, "end": 11, "ctxt": 0 }, "value": "m1", "optional": false }, "body": { "type": "TsModuleBlock", "span": { "start": 12, "end": 257, "ctxt": 0 }, "body": [ { "type": "TsInterfaceDeclaration", "span": { "start": 18, "end": 101, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 28, "end": 35, "ctxt": 0 }, "value": "Promise", "optional": false }, "declare": false, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 35, "end": 38, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 36, "end": 37, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 36, "end": 37, "ctxt": 0 }, "value": "T", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] }, "extends": [], "body": { "type": "TsInterfaceBody", "span": { "start": 39, "end": 101, "ctxt": 0 }, "body": [ { "type": "TsMethodSignature", "span": { "start": 49, "end": 95, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 49, "end": 53, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 57, "end": 81, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 59, "end": 81, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 61, "end": 81, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 62, "end": 66, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 63, "end": 66, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 65, "end": 66, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 65, "end": 66, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 68, "end": 81, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 71, "end": 81, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 71, "end": 78, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 78, "end": 81, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 79, "end": 80, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 79, "end": 80, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 82, "end": 94, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 84, "end": 94, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 84, "end": 91, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 91, "end": 94, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 92, "end": 93, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 92, "end": 93, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 53, "end": 56, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 54, "end": 55, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 54, "end": 55, "ctxt": 0 }, "value": "U", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] } } ] } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 124, "end": 136, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 137, "end": 146, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 137, "end": 146, "ctxt": 0 }, "value": "n", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 138, "end": 146, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 140, "end": 146, "ctxt": 0 }, "kind": "number" } } } } ], "decorators": [], "span": { "start": 107, "end": 165, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 147, "end": 164, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 149, "end": 164, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 149, "end": 156, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 156, "end": 164, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 157, "end": 163, "ctxt": 0 }, "kind": "number" } ] } } } }, { "type": "VariableDeclaration", "span": { "start": 171, "end": 203, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 175, "end": 202, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 175, "end": 185, "ctxt": 0 }, "value": "numPromise", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 185, "end": 202, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 187, "end": 202, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 187, "end": 194, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 194, "end": 202, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 195, "end": 201, "ctxt": 0 }, "kind": "number" } ] } } } }, "init": null, "definite": false } ] }, { "type": "VariableDeclaration", "span": { "start": 208, "end": 255, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 212, "end": 254, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 212, "end": 222, "ctxt": 0 }, "value": "newPromise", "optional": false, "typeAnnotation": null }, "init": { "type": "CallExpression", "span": { "start": 225, "end": 254, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { "start": 225, "end": 240, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 225, "end": 235, "ctxt": 0 }, "value": "numPromise", "optional": false }, "property": { "type": "Identifier", "span": { "start": 236, "end": 240, "ctxt": 0 }, "value": "then", "optional": false } }, "arguments": [ { "spread": null, "expression": { "type": "Identifier", "span": { "start": 241, "end": 253, "ctxt": 0 }, "value": "testFunction", "optional": false } } ], "typeArguments": null }, "definite": false } ] } ] } }, { "type": "TsModuleDeclaration", "span": { "start": 299, "end": 617, "ctxt": 0 }, "declare": false, "global": false, "id": { "type": "Identifier", "span": { "start": 306, "end": 308, "ctxt": 0 }, "value": "m2", "optional": false }, "body": { "type": "TsModuleBlock", "span": { "start": 309, "end": 617, "ctxt": 0 }, "body": [ { "type": "TsInterfaceDeclaration", "span": { "start": 315, "end": 398, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 325, "end": 332, "ctxt": 0 }, "value": "Promise", "optional": false }, "declare": false, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 332, "end": 335, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 333, "end": 334, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 333, "end": 334, "ctxt": 0 }, "value": "T", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] }, "extends": [], "body": { "type": "TsInterfaceBody", "span": { "start": 336, "end": 398, "ctxt": 0 }, "body": [ { "type": "TsMethodSignature", "span": { "start": 346, "end": 392, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 346, "end": 350, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 354, "end": 378, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 356, "end": 378, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 358, "end": 378, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 359, "end": 363, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 360, "end": 363, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 362, "end": 363, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 362, "end": 363, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 365, "end": 378, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 368, "end": 378, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 368, "end": 375, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 375, "end": 378, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 376, "end": 377, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 376, "end": 377, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 379, "end": 391, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 381, "end": 391, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 381, "end": 388, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 388, "end": 391, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 389, "end": 390, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 389, "end": 390, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 350, "end": 353, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 351, "end": 352, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 351, "end": 352, "ctxt": 0 }, "value": "U", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] } } ] } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 421, "end": 433, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 434, "end": 443, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 434, "end": 443, "ctxt": 0 }, "value": "n", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 435, "end": 443, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 437, "end": 443, "ctxt": 0 }, "kind": "number" } } } } ], "decorators": [], "span": { "start": 404, "end": 462, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 444, "end": 461, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 446, "end": 461, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 446, "end": 453, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 453, "end": 461, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 454, "end": 460, "ctxt": 0 }, "kind": "number" } ] } } } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 484, "end": 496, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 497, "end": 506, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 497, "end": 506, "ctxt": 0 }, "value": "s", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 498, "end": 506, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 500, "end": 506, "ctxt": 0 }, "kind": "string" } } } } ], "decorators": [], "span": { "start": 467, "end": 525, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 507, "end": 524, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 509, "end": 524, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 509, "end": 516, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 516, "end": 524, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 517, "end": 523, "ctxt": 0 }, "kind": "string" } ] } } } }, { "type": "VariableDeclaration", "span": { "start": 531, "end": 563, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 535, "end": 562, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 535, "end": 545, "ctxt": 0 }, "value": "numPromise", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 545, "end": 562, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 547, "end": 562, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 547, "end": 554, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 554, "end": 562, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 555, "end": 561, "ctxt": 0 }, "kind": "number" } ] } } } }, "init": null, "definite": false } ] }, { "type": "VariableDeclaration", "span": { "start": 568, "end": 615, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 572, "end": 614, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 572, "end": 582, "ctxt": 0 }, "value": "newPromise", "optional": false, "typeAnnotation": null }, "init": { "type": "CallExpression", "span": { "start": 585, "end": 614, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { "start": 585, "end": 600, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 585, "end": 595, "ctxt": 0 }, "value": "numPromise", "optional": false }, "property": { "type": "Identifier", "span": { "start": 596, "end": 600, "ctxt": 0 }, "value": "then", "optional": false } }, "arguments": [ { "spread": null, "expression": { "type": "Identifier", "span": { "start": 601, "end": 613, "ctxt": 0 }, "value": "testFunction", "optional": false } } ], "typeArguments": null }, "definite": false } ] } ] } }, { "type": "TsModuleDeclaration", "span": { "start": 659, "end": 1005, "ctxt": 0 }, "declare": false, "global": false, "id": { "type": "Identifier", "span": { "start": 666, "end": 668, "ctxt": 0 }, "value": "m3", "optional": false }, "body": { "type": "TsModuleBlock", "span": { "start": 669, "end": 1005, "ctxt": 0 }, "body": [ { "type": "TsInterfaceDeclaration", "span": { "start": 675, "end": 849, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 685, "end": 692, "ctxt": 0 }, "value": "Promise", "optional": false }, "declare": false, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 692, "end": 695, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 693, "end": 694, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 693, "end": 694, "ctxt": 0 }, "value": "T", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] }, "extends": [], "body": { "type": "TsInterfaceBody", "span": { "start": 696, "end": 849, "ctxt": 0 }, "body": [ { "type": "TsMethodSignature", "span": { "start": 706, "end": 752, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 706, "end": 710, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 714, "end": 738, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 716, "end": 738, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 718, "end": 738, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 719, "end": 723, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 720, "end": 723, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 722, "end": 723, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 722, "end": 723, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 725, "end": 738, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 728, "end": 738, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 728, "end": 735, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 735, "end": 738, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 736, "end": 737, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 736, "end": 737, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 739, "end": 751, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 741, "end": 751, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 741, "end": 748, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 748, "end": 751, "ctxt": 0 }, "params": [ { "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 } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 710, "end": 713, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 711, "end": 712, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 711, "end": 712, "ctxt": 0 }, "value": "U", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] } }, { "type": "TsMethodSignature", "span": { "start": 761, "end": 843, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 761, "end": 765, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 769, "end": 793, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 771, "end": 793, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 773, "end": 793, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 774, "end": 778, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 775, "end": 778, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 777, "end": 778, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 777, "end": 778, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 780, "end": 793, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 783, "end": 793, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 783, "end": 790, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 790, "end": 793, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 791, "end": 792, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 791, "end": 792, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } }, { "type": "Identifier", "span": { "start": 795, "end": 829, "ctxt": 0 }, "value": "error", "optional": true, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 801, "end": 829, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 803, "end": 829, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 804, "end": 814, "ctxt": 0 }, "value": "error", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 809, "end": 814, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 811, "end": 814, "ctxt": 0 }, "kind": "any" } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 816, "end": 829, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 819, "end": 829, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 819, "end": 826, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 826, "end": 829, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 827, "end": 828, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 827, "end": 828, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 830, "end": 842, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 832, "end": 842, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 832, "end": 839, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 839, "end": 842, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 840, "end": 841, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 840, "end": 841, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 765, "end": 768, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 766, "end": 767, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 766, "end": 767, "ctxt": 0 }, "value": "U", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] } } ] } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 872, "end": 884, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 885, "end": 894, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 885, "end": 894, "ctxt": 0 }, "value": "n", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 886, "end": 894, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 888, "end": 894, "ctxt": 0 }, "kind": "number" } } } } ], "decorators": [], "span": { "start": 855, "end": 913, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 895, "end": 912, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 897, "end": 912, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 897, "end": 904, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 904, "end": 912, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 905, "end": 911, "ctxt": 0 }, "kind": "number" } ] } } } }, { "type": "VariableDeclaration", "span": { "start": 919, "end": 951, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 923, "end": 950, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 923, "end": 933, "ctxt": 0 }, "value": "numPromise", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 933, "end": 950, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 935, "end": 950, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 935, "end": 942, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 942, "end": 950, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 943, "end": 949, "ctxt": 0 }, "kind": "number" } ] } } } }, "init": null, "definite": false } ] }, { "type": "VariableDeclaration", "span": { "start": 956, "end": 1003, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 960, "end": 1002, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 960, "end": 970, "ctxt": 0 }, "value": "newPromise", "optional": false, "typeAnnotation": null }, "init": { "type": "CallExpression", "span": { "start": 973, "end": 1002, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { "start": 973, "end": 988, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 973, "end": 983, "ctxt": 0 }, "value": "numPromise", "optional": false }, "property": { "type": "Identifier", "span": { "start": 984, "end": 988, "ctxt": 0 }, "value": "then", "optional": false } }, "arguments": [ { "spread": null, "expression": { "type": "Identifier", "span": { "start": 989, "end": 1001, "ctxt": 0 }, "value": "testFunction", "optional": false } } ], "typeArguments": null }, "definite": false } ] } ] } }, { "type": "TsModuleDeclaration", "span": { "start": 1047, "end": 1456, "ctxt": 0 }, "declare": false, "global": false, "id": { "type": "Identifier", "span": { "start": 1054, "end": 1056, "ctxt": 0 }, "value": "m4", "optional": false }, "body": { "type": "TsModuleBlock", "span": { "start": 1057, "end": 1456, "ctxt": 0 }, "body": [ { "type": "TsInterfaceDeclaration", "span": { "start": 1063, "end": 1237, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 1073, "end": 1080, "ctxt": 0 }, "value": "Promise", "optional": false }, "declare": false, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 1080, "end": 1083, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 1081, "end": 1082, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 1081, "end": 1082, "ctxt": 0 }, "value": "T", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] }, "extends": [], "body": { "type": "TsInterfaceBody", "span": { "start": 1084, "end": 1237, "ctxt": 0 }, "body": [ { "type": "TsMethodSignature", "span": { "start": 1094, "end": 1140, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 1094, "end": 1098, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 1102, "end": 1126, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1104, "end": 1126, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1106, "end": 1126, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1107, "end": 1111, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1108, "end": 1111, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1110, "end": 1111, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1110, "end": 1111, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1113, "end": 1126, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1116, "end": 1126, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1116, "end": 1123, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1123, "end": 1126, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1124, "end": 1125, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1124, "end": 1125, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 1127, "end": 1139, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1129, "end": 1139, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1129, "end": 1136, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1136, "end": 1139, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1137, "end": 1138, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1137, "end": 1138, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 1098, "end": 1101, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 1099, "end": 1100, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 1099, "end": 1100, "ctxt": 0 }, "value": "U", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] } }, { "type": "TsMethodSignature", "span": { "start": 1149, "end": 1231, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 1149, "end": 1153, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 1157, "end": 1181, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1159, "end": 1181, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1161, "end": 1181, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1162, "end": 1166, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1163, "end": 1166, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1165, "end": 1166, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1165, "end": 1166, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1168, "end": 1181, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1171, "end": 1181, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1171, "end": 1178, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1178, "end": 1181, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1179, "end": 1180, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1179, "end": 1180, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } }, { "type": "Identifier", "span": { "start": 1183, "end": 1217, "ctxt": 0 }, "value": "error", "optional": true, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1189, "end": 1217, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1191, "end": 1217, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1192, "end": 1202, "ctxt": 0 }, "value": "error", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1197, "end": 1202, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1199, "end": 1202, "ctxt": 0 }, "kind": "any" } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1204, "end": 1217, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1207, "end": 1217, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1207, "end": 1214, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1214, "end": 1217, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1215, "end": 1216, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1215, "end": 1216, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 1218, "end": 1230, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1220, "end": 1230, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1220, "end": 1227, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1227, "end": 1230, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1228, "end": 1229, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1228, "end": 1229, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 1153, "end": 1156, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 1154, "end": 1155, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 1154, "end": 1155, "ctxt": 0 }, "value": "U", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] } } ] } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 1260, "end": 1272, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 1273, "end": 1282, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 1273, "end": 1282, "ctxt": 0 }, "value": "n", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1274, "end": 1282, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1276, "end": 1282, "ctxt": 0 }, "kind": "number" } } } } ], "decorators": [], "span": { "start": 1243, "end": 1301, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 1283, "end": 1300, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1285, "end": 1300, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1285, "end": 1292, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1292, "end": 1300, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 1293, "end": 1299, "ctxt": 0 }, "kind": "number" } ] } } } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 1323, "end": 1335, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 1336, "end": 1345, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 1336, "end": 1345, "ctxt": 0 }, "value": "s", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1337, "end": 1345, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1339, "end": 1345, "ctxt": 0 }, "kind": "string" } } } } ], "decorators": [], "span": { "start": 1306, "end": 1364, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 1346, "end": 1363, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1348, "end": 1363, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1348, "end": 1355, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1355, "end": 1363, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 1356, "end": 1362, "ctxt": 0 }, "kind": "string" } ] } } } }, { "type": "VariableDeclaration", "span": { "start": 1370, "end": 1402, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 1374, "end": 1401, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 1374, "end": 1384, "ctxt": 0 }, "value": "numPromise", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1384, "end": 1401, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1386, "end": 1401, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1386, "end": 1393, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1393, "end": 1401, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 1394, "end": 1400, "ctxt": 0 }, "kind": "number" } ] } } } }, "init": null, "definite": false } ] }, { "type": "VariableDeclaration", "span": { "start": 1407, "end": 1454, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 1411, "end": 1453, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 1411, "end": 1421, "ctxt": 0 }, "value": "newPromise", "optional": false, "typeAnnotation": null }, "init": { "type": "CallExpression", "span": { "start": 1424, "end": 1453, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { "start": 1424, "end": 1439, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 1424, "end": 1434, "ctxt": 0 }, "value": "numPromise", "optional": false }, "property": { "type": "Identifier", "span": { "start": 1435, "end": 1439, "ctxt": 0 }, "value": "then", "optional": false } }, "arguments": [ { "spread": null, "expression": { "type": "Identifier", "span": { "start": 1440, "end": 1452, "ctxt": 0 }, "value": "testFunction", "optional": false } } ], "typeArguments": null }, "definite": false } ] } ] } }, { "type": "TsModuleDeclaration", "span": { "start": 1498, "end": 2029, "ctxt": 0 }, "declare": false, "global": false, "id": { "type": "Identifier", "span": { "start": 1505, "end": 1507, "ctxt": 0 }, "value": "m5", "optional": false }, "body": { "type": "TsModuleBlock", "span": { "start": 1508, "end": 2029, "ctxt": 0 }, "body": [ { "type": "TsInterfaceDeclaration", "span": { "start": 1514, "end": 1810, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 1524, "end": 1531, "ctxt": 0 }, "value": "Promise", "optional": false }, "declare": false, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 1531, "end": 1534, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 1532, "end": 1533, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 1532, "end": 1533, "ctxt": 0 }, "value": "T", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] }, "extends": [], "body": { "type": "TsInterfaceBody", "span": { "start": 1535, "end": 1810, "ctxt": 0 }, "body": [ { "type": "TsMethodSignature", "span": { "start": 1545, "end": 1591, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 1545, "end": 1549, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 1553, "end": 1577, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1555, "end": 1577, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1557, "end": 1577, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1558, "end": 1562, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1559, "end": 1562, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1561, "end": 1562, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1561, "end": 1562, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1564, "end": 1577, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1567, "end": 1577, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1567, "end": 1574, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1574, "end": 1577, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1575, "end": 1576, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1575, "end": 1576, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 1578, "end": 1590, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1580, "end": 1590, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1580, "end": 1587, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1587, "end": 1590, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1588, "end": 1589, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1588, "end": 1589, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 1549, "end": 1552, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 1550, "end": 1551, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 1550, "end": 1551, "ctxt": 0 }, "value": "U", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] } }, { "type": "TsMethodSignature", "span": { "start": 1600, "end": 1682, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 1600, "end": 1604, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 1608, "end": 1632, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1610, "end": 1632, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1612, "end": 1632, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1613, "end": 1617, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1614, "end": 1617, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1616, "end": 1617, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1616, "end": 1617, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1619, "end": 1632, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1622, "end": 1632, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1622, "end": 1629, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1629, "end": 1632, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1630, "end": 1631, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1630, "end": 1631, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } }, { "type": "Identifier", "span": { "start": 1634, "end": 1668, "ctxt": 0 }, "value": "error", "optional": true, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1640, "end": 1668, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1642, "end": 1668, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1643, "end": 1653, "ctxt": 0 }, "value": "error", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1648, "end": 1653, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1650, "end": 1653, "ctxt": 0 }, "kind": "any" } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1655, "end": 1668, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1658, "end": 1668, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1658, "end": 1665, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1665, "end": 1668, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1666, "end": 1667, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1666, "end": 1667, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 1669, "end": 1681, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1671, "end": 1681, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1671, "end": 1678, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1678, "end": 1681, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1679, "end": 1680, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1679, "end": 1680, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 1604, "end": 1607, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 1605, "end": 1606, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 1605, "end": 1606, "ctxt": 0 }, "value": "U", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] } }, { "type": "TsMethodSignature", "span": { "start": 1691, "end": 1804, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 1691, "end": 1695, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 1699, "end": 1723, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1701, "end": 1723, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1703, "end": 1723, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1704, "end": 1708, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1705, "end": 1708, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1707, "end": 1708, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1707, "end": 1708, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1710, "end": 1723, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1713, "end": 1723, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1713, "end": 1720, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1720, "end": 1723, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1721, "end": 1722, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1721, "end": 1722, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } }, { "type": "Identifier", "span": { "start": 1725, "end": 1750, "ctxt": 0 }, "value": "error", "optional": true, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1731, "end": 1750, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1733, "end": 1750, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1734, "end": 1744, "ctxt": 0 }, "value": "error", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1739, "end": 1744, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1741, "end": 1744, "ctxt": 0 }, "kind": "any" } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1746, "end": 1750, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1749, "end": 1750, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1749, "end": 1750, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } } } } }, { "type": "Identifier", "span": { "start": 1752, "end": 1790, "ctxt": 0 }, "value": "progress", "optional": true, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1761, "end": 1790, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1763, "end": 1790, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1764, "end": 1781, "ctxt": 0 }, "value": "preservation", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1776, "end": 1781, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1778, "end": 1781, "ctxt": 0 }, "kind": "any" } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1783, "end": 1790, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1786, "end": 1790, "ctxt": 0 }, "kind": "void" } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 1791, "end": 1803, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1793, "end": 1803, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1793, "end": 1800, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1800, "end": 1803, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1801, "end": 1802, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1801, "end": 1802, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 1695, "end": 1698, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 1696, "end": 1697, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 1696, "end": 1697, "ctxt": 0 }, "value": "U", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] } } ] } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 1833, "end": 1845, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 1846, "end": 1855, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 1846, "end": 1855, "ctxt": 0 }, "value": "n", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1847, "end": 1855, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1849, "end": 1855, "ctxt": 0 }, "kind": "number" } } } } ], "decorators": [], "span": { "start": 1816, "end": 1874, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 1856, "end": 1873, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1858, "end": 1873, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1858, "end": 1865, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1865, "end": 1873, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 1866, "end": 1872, "ctxt": 0 }, "kind": "number" } ] } } } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 1896, "end": 1908, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 1909, "end": 1918, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 1909, "end": 1918, "ctxt": 0 }, "value": "s", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1910, "end": 1918, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1912, "end": 1918, "ctxt": 0 }, "kind": "string" } } } } ], "decorators": [], "span": { "start": 1879, "end": 1937, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 1919, "end": 1936, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1921, "end": 1936, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1921, "end": 1928, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1928, "end": 1936, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 1929, "end": 1935, "ctxt": 0 }, "kind": "string" } ] } } } }, { "type": "VariableDeclaration", "span": { "start": 1943, "end": 1975, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 1947, "end": 1974, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 1947, "end": 1957, "ctxt": 0 }, "value": "numPromise", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1957, "end": 1974, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1959, "end": 1974, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1959, "end": 1966, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1966, "end": 1974, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 1967, "end": 1973, "ctxt": 0 }, "kind": "number" } ] } } } }, "init": null, "definite": false } ] }, { "type": "VariableDeclaration", "span": { "start": 1980, "end": 2027, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 1984, "end": 2026, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 1984, "end": 1994, "ctxt": 0 }, "value": "newPromise", "optional": false, "typeAnnotation": null }, "init": { "type": "CallExpression", "span": { "start": 1997, "end": 2026, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { "start": 1997, "end": 2012, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 1997, "end": 2007, "ctxt": 0 }, "value": "numPromise", "optional": false }, "property": { "type": "Identifier", "span": { "start": 2008, "end": 2012, "ctxt": 0 }, "value": "then", "optional": false } }, "arguments": [ { "spread": null, "expression": { "type": "Identifier", "span": { "start": 2013, "end": 2025, "ctxt": 0 }, "value": "testFunction", "optional": false } } ], "typeArguments": null }, "definite": false } ] } ] } }, { "type": "TsModuleDeclaration", "span": { "start": 2071, "end": 2545, "ctxt": 0 }, "declare": false, "global": false, "id": { "type": "Identifier", "span": { "start": 2078, "end": 2080, "ctxt": 0 }, "value": "m6", "optional": false }, "body": { "type": "TsModuleBlock", "span": { "start": 2081, "end": 2545, "ctxt": 0 }, "body": [ { "type": "TsInterfaceDeclaration", "span": { "start": 2087, "end": 2261, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 2097, "end": 2104, "ctxt": 0 }, "value": "Promise", "optional": false }, "declare": false, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 2104, "end": 2107, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 2105, "end": 2106, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 2105, "end": 2106, "ctxt": 0 }, "value": "T", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] }, "extends": [], "body": { "type": "TsInterfaceBody", "span": { "start": 2108, "end": 2261, "ctxt": 0 }, "body": [ { "type": "TsMethodSignature", "span": { "start": 2118, "end": 2164, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 2118, "end": 2122, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 2126, "end": 2150, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2128, "end": 2150, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 2130, "end": 2150, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 2131, "end": 2135, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2132, "end": 2135, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2134, "end": 2135, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2134, "end": 2135, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2137, "end": 2150, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2140, "end": 2150, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2140, "end": 2147, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2147, "end": 2150, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 2148, "end": 2149, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2148, "end": 2149, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 2151, "end": 2163, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2153, "end": 2163, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2153, "end": 2160, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2160, "end": 2163, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 2161, "end": 2162, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2161, "end": 2162, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 2122, "end": 2125, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 2123, "end": 2124, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 2123, "end": 2124, "ctxt": 0 }, "value": "U", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] } }, { "type": "TsMethodSignature", "span": { "start": 2173, "end": 2255, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 2173, "end": 2177, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 2181, "end": 2205, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2183, "end": 2205, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 2185, "end": 2205, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 2186, "end": 2190, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2187, "end": 2190, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2189, "end": 2190, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2189, "end": 2190, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2192, "end": 2205, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2195, "end": 2205, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2195, "end": 2202, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2202, "end": 2205, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 2203, "end": 2204, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2203, "end": 2204, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } }, { "type": "Identifier", "span": { "start": 2207, "end": 2241, "ctxt": 0 }, "value": "error", "optional": true, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2213, "end": 2241, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 2215, "end": 2241, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 2216, "end": 2226, "ctxt": 0 }, "value": "error", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2221, "end": 2226, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 2223, "end": 2226, "ctxt": 0 }, "kind": "any" } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2228, "end": 2241, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2231, "end": 2241, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2231, "end": 2238, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2238, "end": 2241, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 2239, "end": 2240, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2239, "end": 2240, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 2242, "end": 2254, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2244, "end": 2254, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2244, "end": 2251, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2251, "end": 2254, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 2252, "end": 2253, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2252, "end": 2253, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 2177, "end": 2180, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 2178, "end": 2179, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 2178, "end": 2179, "ctxt": 0 }, "value": "U", "optional": false }, "in": false, "out": false, "const": false, "constraint": null, "default": null } ] } } ] } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 2284, "end": 2296, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 2297, "end": 2306, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 2297, "end": 2306, "ctxt": 0 }, "value": "n", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2298, "end": 2306, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 2300, "end": 2306, "ctxt": 0 }, "kind": "number" } } } } ], "decorators": [], "span": { "start": 2267, "end": 2325, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 2307, "end": 2324, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2309, "end": 2324, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2309, "end": 2316, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2316, "end": 2324, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 2317, "end": 2323, "ctxt": 0 }, "kind": "number" } ] } } } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 2347, "end": 2359, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 2360, "end": 2369, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 2360, "end": 2369, "ctxt": 0 }, "value": "s", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2361, "end": 2369, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 2363, "end": 2369, "ctxt": 0 }, "kind": "string" } } } } ], "decorators": [], "span": { "start": 2330, "end": 2388, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 2370, "end": 2387, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2372, "end": 2387, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2372, "end": 2379, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2379, "end": 2387, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 2380, "end": 2386, "ctxt": 0 }, "kind": "string" } ] } } } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 2410, "end": 2422, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 2423, "end": 2433, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 2423, "end": 2433, "ctxt": 0 }, "value": "b", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2424, "end": 2433, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 2426, "end": 2433, "ctxt": 0 }, "kind": "boolean" } } } } ], "decorators": [], "span": { "start": 2393, "end": 2453, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 2434, "end": 2452, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2436, "end": 2452, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2436, "end": 2443, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2443, "end": 2452, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 2444, "end": 2451, "ctxt": 0 }, "kind": "boolean" } ] } } } }, { "type": "VariableDeclaration", "span": { "start": 2459, "end": 2491, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 2463, "end": 2490, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 2463, "end": 2473, "ctxt": 0 }, "value": "numPromise", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2473, "end": 2490, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2475, "end": 2490, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2475, "end": 2482, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2482, "end": 2490, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 2483, "end": 2489, "ctxt": 0 }, "kind": "number" } ] } } } }, "init": null, "definite": false } ] }, { "type": "VariableDeclaration", "span": { "start": 2496, "end": 2543, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 2500, "end": 2542, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 2500, "end": 2510, "ctxt": 0 }, "value": "newPromise", "optional": false, "typeAnnotation": null }, "init": { "type": "CallExpression", "span": { "start": 2513, "end": 2542, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { "start": 2513, "end": 2528, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 2513, "end": 2523, "ctxt": 0 }, "value": "numPromise", "optional": false }, "property": { "type": "Identifier", "span": { "start": 2524, "end": 2528, "ctxt": 0 }, "value": "then", "optional": false } }, "arguments": [ { "spread": null, "expression": { "type": "Identifier", "span": { "start": 2529, "end": 2541, "ctxt": 0 }, "value": "testFunction", "optional": false } } ], "typeArguments": null }, "definite": false } ] } ] } } ], "interpreter": null }