{ "type": "Script", "span": { "start": 1, "end": 2544, "ctxt": 0 }, "body": [ { "type": "TsModuleDeclaration", "span": { "start": 1, "end": 256, "ctxt": 0 }, "declare": false, "global": false, "id": { "type": "Identifier", "span": { "start": 8, "end": 10, "ctxt": 0 }, "value": "m1", "optional": false }, "body": { "type": "TsModuleBlock", "span": { "start": 11, "end": 256, "ctxt": 0 }, "body": [ { "type": "TsInterfaceDeclaration", "span": { "start": 17, "end": 100, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 27, "end": 34, "ctxt": 0 }, "value": "Promise", "optional": false }, "declare": false, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 34, "end": 37, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 35, "end": 36, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 35, "end": 36, "ctxt": 0 }, "value": "T", "optional": false }, "constraint": null, "default": null } ] }, "extends": [], "body": { "type": "TsInterfaceBody", "span": { "start": 38, "end": 100, "ctxt": 0 }, "body": [ { "type": "TsMethodSignature", "span": { "start": 48, "end": 94, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 48, "end": 52, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 56, "end": 80, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 58, "end": 80, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 60, "end": 80, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 61, "end": 65, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 62, "end": 65, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 64, "end": 65, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 64, "end": 65, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 67, "end": 80, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 70, "end": 80, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 70, "end": 77, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 77, "end": 80, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 78, "end": 79, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 78, "end": 79, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 81, "end": 93, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 83, "end": 93, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 83, "end": 90, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 90, "end": 93, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 91, "end": 92, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 91, "end": 92, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 52, "end": 55, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 53, "end": 54, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 53, "end": 54, "ctxt": 0 }, "value": "U", "optional": false }, "constraint": null, "default": null } ] } } ] } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 123, "end": 135, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 136, "end": 145, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 136, "end": 145, "ctxt": 0 }, "value": "n", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 137, "end": 145, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 139, "end": 145, "ctxt": 0 }, "kind": "number" } } } } ], "decorators": [], "span": { "start": 106, "end": 164, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 146, "end": 163, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 148, "end": 163, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 148, "end": 155, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 155, "end": 163, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 156, "end": 162, "ctxt": 0 }, "kind": "number" } ] } } } }, { "type": "VariableDeclaration", "span": { "start": 170, "end": 202, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 174, "end": 201, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 174, "end": 184, "ctxt": 0 }, "value": "numPromise", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 184, "end": 201, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 186, "end": 201, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 186, "end": 193, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 193, "end": 201, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 194, "end": 200, "ctxt": 0 }, "kind": "number" } ] } } } }, "init": null, "definite": false } ] }, { "type": "VariableDeclaration", "span": { "start": 207, "end": 254, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 211, "end": 253, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 211, "end": 221, "ctxt": 0 }, "value": "newPromise", "optional": false, "typeAnnotation": null }, "init": { "type": "CallExpression", "span": { "start": 224, "end": 253, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { "start": 224, "end": 239, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 224, "end": 234, "ctxt": 0 }, "value": "numPromise", "optional": false }, "property": { "type": "Identifier", "span": { "start": 235, "end": 239, "ctxt": 0 }, "value": "then", "optional": false } }, "arguments": [ { "spread": null, "expression": { "type": "Identifier", "span": { "start": 240, "end": 252, "ctxt": 0 }, "value": "testFunction", "optional": false } } ], "typeArguments": null }, "definite": false } ] } ] } }, { "type": "TsModuleDeclaration", "span": { "start": 298, "end": 616, "ctxt": 0 }, "declare": false, "global": false, "id": { "type": "Identifier", "span": { "start": 305, "end": 307, "ctxt": 0 }, "value": "m2", "optional": false }, "body": { "type": "TsModuleBlock", "span": { "start": 308, "end": 616, "ctxt": 0 }, "body": [ { "type": "TsInterfaceDeclaration", "span": { "start": 314, "end": 397, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 324, "end": 331, "ctxt": 0 }, "value": "Promise", "optional": false }, "declare": false, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 331, "end": 334, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 332, "end": 333, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 332, "end": 333, "ctxt": 0 }, "value": "T", "optional": false }, "constraint": null, "default": null } ] }, "extends": [], "body": { "type": "TsInterfaceBody", "span": { "start": 335, "end": 397, "ctxt": 0 }, "body": [ { "type": "TsMethodSignature", "span": { "start": 345, "end": 391, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 345, "end": 349, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 353, "end": 377, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 355, "end": 377, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 357, "end": 377, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 358, "end": 362, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 359, "end": 362, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 361, "end": 362, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 361, "end": 362, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 364, "end": 377, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 367, "end": 377, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 367, "end": 374, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 374, "end": 377, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 375, "end": 376, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 375, "end": 376, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 378, "end": 390, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 380, "end": 390, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 380, "end": 387, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 387, "end": 390, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 388, "end": 389, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 388, "end": 389, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 349, "end": 352, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 350, "end": 351, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 350, "end": 351, "ctxt": 0 }, "value": "U", "optional": false }, "constraint": null, "default": null } ] } } ] } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 420, "end": 432, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 433, "end": 442, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 433, "end": 442, "ctxt": 0 }, "value": "n", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 434, "end": 442, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 436, "end": 442, "ctxt": 0 }, "kind": "number" } } } } ], "decorators": [], "span": { "start": 403, "end": 461, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 443, "end": 460, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 445, "end": 460, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 445, "end": 452, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 452, "end": 460, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 453, "end": 459, "ctxt": 0 }, "kind": "number" } ] } } } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 483, "end": 495, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 496, "end": 505, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 496, "end": 505, "ctxt": 0 }, "value": "s", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 497, "end": 505, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 499, "end": 505, "ctxt": 0 }, "kind": "string" } } } } ], "decorators": [], "span": { "start": 466, "end": 524, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 506, "end": 523, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 508, "end": 523, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 508, "end": 515, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 515, "end": 523, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 516, "end": 522, "ctxt": 0 }, "kind": "string" } ] } } } }, { "type": "VariableDeclaration", "span": { "start": 530, "end": 562, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 534, "end": 561, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 534, "end": 544, "ctxt": 0 }, "value": "numPromise", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 544, "end": 561, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 546, "end": 561, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 546, "end": 553, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 553, "end": 561, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 554, "end": 560, "ctxt": 0 }, "kind": "number" } ] } } } }, "init": null, "definite": false } ] }, { "type": "VariableDeclaration", "span": { "start": 567, "end": 614, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 571, "end": 613, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 571, "end": 581, "ctxt": 0 }, "value": "newPromise", "optional": false, "typeAnnotation": null }, "init": { "type": "CallExpression", "span": { "start": 584, "end": 613, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { "start": 584, "end": 599, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 584, "end": 594, "ctxt": 0 }, "value": "numPromise", "optional": false }, "property": { "type": "Identifier", "span": { "start": 595, "end": 599, "ctxt": 0 }, "value": "then", "optional": false } }, "arguments": [ { "spread": null, "expression": { "type": "Identifier", "span": { "start": 600, "end": 612, "ctxt": 0 }, "value": "testFunction", "optional": false } } ], "typeArguments": null }, "definite": false } ] } ] } }, { "type": "TsModuleDeclaration", "span": { "start": 658, "end": 1004, "ctxt": 0 }, "declare": false, "global": false, "id": { "type": "Identifier", "span": { "start": 665, "end": 667, "ctxt": 0 }, "value": "m3", "optional": false }, "body": { "type": "TsModuleBlock", "span": { "start": 668, "end": 1004, "ctxt": 0 }, "body": [ { "type": "TsInterfaceDeclaration", "span": { "start": 674, "end": 848, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 684, "end": 691, "ctxt": 0 }, "value": "Promise", "optional": false }, "declare": false, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 691, "end": 694, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 692, "end": 693, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 692, "end": 693, "ctxt": 0 }, "value": "T", "optional": false }, "constraint": null, "default": null } ] }, "extends": [], "body": { "type": "TsInterfaceBody", "span": { "start": 695, "end": 848, "ctxt": 0 }, "body": [ { "type": "TsMethodSignature", "span": { "start": 705, "end": 751, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 705, "end": 709, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 713, "end": 737, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 715, "end": 737, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 717, "end": 737, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 718, "end": 722, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 719, "end": 722, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 721, "end": 722, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 721, "end": 722, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 724, "end": 737, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 727, "end": 737, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 727, "end": 734, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 734, "end": 737, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 735, "end": 736, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 735, "end": 736, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 738, "end": 750, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 740, "end": 750, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 740, "end": 747, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 747, "end": 750, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 748, "end": 749, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 748, "end": 749, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 709, "end": 712, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 710, "end": 711, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 710, "end": 711, "ctxt": 0 }, "value": "U", "optional": false }, "constraint": null, "default": null } ] } }, { "type": "TsMethodSignature", "span": { "start": 760, "end": 842, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 760, "end": 764, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 768, "end": 792, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 770, "end": 792, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 772, "end": 792, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 773, "end": 777, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 774, "end": 777, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 776, "end": 777, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 776, "end": 777, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 779, "end": 792, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 782, "end": 792, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 782, "end": 789, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 789, "end": 792, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 790, "end": 791, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 790, "end": 791, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } }, { "type": "Identifier", "span": { "start": 794, "end": 828, "ctxt": 0 }, "value": "error", "optional": true, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 800, "end": 828, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 802, "end": 828, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 803, "end": 813, "ctxt": 0 }, "value": "error", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 808, "end": 813, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 810, "end": 813, "ctxt": 0 }, "kind": "any" } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 815, "end": 828, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 818, "end": 828, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 818, "end": 825, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 825, "end": 828, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 826, "end": 827, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 826, "end": 827, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 829, "end": 841, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 831, "end": 841, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 831, "end": 838, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 838, "end": 841, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 839, "end": 840, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 839, "end": 840, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 764, "end": 767, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 765, "end": 766, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 765, "end": 766, "ctxt": 0 }, "value": "U", "optional": false }, "constraint": null, "default": null } ] } } ] } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 871, "end": 883, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 884, "end": 893, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 884, "end": 893, "ctxt": 0 }, "value": "n", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 885, "end": 893, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 887, "end": 893, "ctxt": 0 }, "kind": "number" } } } } ], "decorators": [], "span": { "start": 854, "end": 912, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 894, "end": 911, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 896, "end": 911, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 896, "end": 903, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 903, "end": 911, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 904, "end": 910, "ctxt": 0 }, "kind": "number" } ] } } } }, { "type": "VariableDeclaration", "span": { "start": 918, "end": 950, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 922, "end": 949, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 922, "end": 932, "ctxt": 0 }, "value": "numPromise", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 932, "end": 949, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 934, "end": 949, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 934, "end": 941, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 941, "end": 949, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 942, "end": 948, "ctxt": 0 }, "kind": "number" } ] } } } }, "init": null, "definite": false } ] }, { "type": "VariableDeclaration", "span": { "start": 955, "end": 1002, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 959, "end": 1001, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 959, "end": 969, "ctxt": 0 }, "value": "newPromise", "optional": false, "typeAnnotation": null }, "init": { "type": "CallExpression", "span": { "start": 972, "end": 1001, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { "start": 972, "end": 987, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 972, "end": 982, "ctxt": 0 }, "value": "numPromise", "optional": false }, "property": { "type": "Identifier", "span": { "start": 983, "end": 987, "ctxt": 0 }, "value": "then", "optional": false } }, "arguments": [ { "spread": null, "expression": { "type": "Identifier", "span": { "start": 988, "end": 1000, "ctxt": 0 }, "value": "testFunction", "optional": false } } ], "typeArguments": null }, "definite": false } ] } ] } }, { "type": "TsModuleDeclaration", "span": { "start": 1046, "end": 1455, "ctxt": 0 }, "declare": false, "global": false, "id": { "type": "Identifier", "span": { "start": 1053, "end": 1055, "ctxt": 0 }, "value": "m4", "optional": false }, "body": { "type": "TsModuleBlock", "span": { "start": 1056, "end": 1455, "ctxt": 0 }, "body": [ { "type": "TsInterfaceDeclaration", "span": { "start": 1062, "end": 1236, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 1072, "end": 1079, "ctxt": 0 }, "value": "Promise", "optional": false }, "declare": false, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 1079, "end": 1082, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 1080, "end": 1081, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 1080, "end": 1081, "ctxt": 0 }, "value": "T", "optional": false }, "constraint": null, "default": null } ] }, "extends": [], "body": { "type": "TsInterfaceBody", "span": { "start": 1083, "end": 1236, "ctxt": 0 }, "body": [ { "type": "TsMethodSignature", "span": { "start": 1093, "end": 1139, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 1093, "end": 1097, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 1101, "end": 1125, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1103, "end": 1125, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1105, "end": 1125, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1106, "end": 1110, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1107, "end": 1110, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1109, "end": 1110, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1109, "end": 1110, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1112, "end": 1125, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1115, "end": 1125, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1115, "end": 1122, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1122, "end": 1125, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1123, "end": 1124, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1123, "end": 1124, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 1126, "end": 1138, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1128, "end": 1138, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1128, "end": 1135, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1135, "end": 1138, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1136, "end": 1137, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1136, "end": 1137, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 1097, "end": 1100, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 1098, "end": 1099, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 1098, "end": 1099, "ctxt": 0 }, "value": "U", "optional": false }, "constraint": null, "default": null } ] } }, { "type": "TsMethodSignature", "span": { "start": 1148, "end": 1230, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 1148, "end": 1152, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 1156, "end": 1180, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1158, "end": 1180, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1160, "end": 1180, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1161, "end": 1165, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1162, "end": 1165, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1164, "end": 1165, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1164, "end": 1165, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1167, "end": 1180, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1170, "end": 1180, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1170, "end": 1177, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1177, "end": 1180, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1178, "end": 1179, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1178, "end": 1179, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } }, { "type": "Identifier", "span": { "start": 1182, "end": 1216, "ctxt": 0 }, "value": "error", "optional": true, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1188, "end": 1216, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1190, "end": 1216, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1191, "end": 1201, "ctxt": 0 }, "value": "error", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1196, "end": 1201, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1198, "end": 1201, "ctxt": 0 }, "kind": "any" } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1203, "end": 1216, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1206, "end": 1216, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1206, "end": 1213, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1213, "end": 1216, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1214, "end": 1215, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1214, "end": 1215, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 1217, "end": 1229, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1219, "end": 1229, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1219, "end": 1226, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1226, "end": 1229, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1227, "end": 1228, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1227, "end": 1228, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 1152, "end": 1155, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 1153, "end": 1154, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 1153, "end": 1154, "ctxt": 0 }, "value": "U", "optional": false }, "constraint": null, "default": null } ] } } ] } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 1259, "end": 1271, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 1272, "end": 1281, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 1272, "end": 1281, "ctxt": 0 }, "value": "n", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1273, "end": 1281, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1275, "end": 1281, "ctxt": 0 }, "kind": "number" } } } } ], "decorators": [], "span": { "start": 1242, "end": 1300, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 1282, "end": 1299, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1284, "end": 1299, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1284, "end": 1291, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1291, "end": 1299, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 1292, "end": 1298, "ctxt": 0 }, "kind": "number" } ] } } } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 1322, "end": 1334, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 1335, "end": 1344, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 1335, "end": 1344, "ctxt": 0 }, "value": "s", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1336, "end": 1344, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1338, "end": 1344, "ctxt": 0 }, "kind": "string" } } } } ], "decorators": [], "span": { "start": 1305, "end": 1363, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 1345, "end": 1362, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1347, "end": 1362, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1347, "end": 1354, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1354, "end": 1362, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 1355, "end": 1361, "ctxt": 0 }, "kind": "string" } ] } } } }, { "type": "VariableDeclaration", "span": { "start": 1369, "end": 1401, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 1373, "end": 1400, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 1373, "end": 1383, "ctxt": 0 }, "value": "numPromise", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1383, "end": 1400, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1385, "end": 1400, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1385, "end": 1392, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1392, "end": 1400, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 1393, "end": 1399, "ctxt": 0 }, "kind": "number" } ] } } } }, "init": null, "definite": false } ] }, { "type": "VariableDeclaration", "span": { "start": 1406, "end": 1453, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 1410, "end": 1452, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 1410, "end": 1420, "ctxt": 0 }, "value": "newPromise", "optional": false, "typeAnnotation": null }, "init": { "type": "CallExpression", "span": { "start": 1423, "end": 1452, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { "start": 1423, "end": 1438, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 1423, "end": 1433, "ctxt": 0 }, "value": "numPromise", "optional": false }, "property": { "type": "Identifier", "span": { "start": 1434, "end": 1438, "ctxt": 0 }, "value": "then", "optional": false } }, "arguments": [ { "spread": null, "expression": { "type": "Identifier", "span": { "start": 1439, "end": 1451, "ctxt": 0 }, "value": "testFunction", "optional": false } } ], "typeArguments": null }, "definite": false } ] } ] } }, { "type": "TsModuleDeclaration", "span": { "start": 1497, "end": 2028, "ctxt": 0 }, "declare": false, "global": false, "id": { "type": "Identifier", "span": { "start": 1504, "end": 1506, "ctxt": 0 }, "value": "m5", "optional": false }, "body": { "type": "TsModuleBlock", "span": { "start": 1507, "end": 2028, "ctxt": 0 }, "body": [ { "type": "TsInterfaceDeclaration", "span": { "start": 1513, "end": 1809, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 1523, "end": 1530, "ctxt": 0 }, "value": "Promise", "optional": false }, "declare": false, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 1530, "end": 1533, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 1531, "end": 1532, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 1531, "end": 1532, "ctxt": 0 }, "value": "T", "optional": false }, "constraint": null, "default": null } ] }, "extends": [], "body": { "type": "TsInterfaceBody", "span": { "start": 1534, "end": 1809, "ctxt": 0 }, "body": [ { "type": "TsMethodSignature", "span": { "start": 1544, "end": 1590, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 1544, "end": 1548, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 1552, "end": 1576, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1554, "end": 1576, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1556, "end": 1576, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1557, "end": 1561, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1558, "end": 1561, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1560, "end": 1561, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1560, "end": 1561, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1563, "end": 1576, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1566, "end": 1576, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1566, "end": 1573, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1573, "end": 1576, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1574, "end": 1575, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1574, "end": 1575, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 1577, "end": 1589, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1579, "end": 1589, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1579, "end": 1586, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1586, "end": 1589, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1587, "end": 1588, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1587, "end": 1588, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 1548, "end": 1551, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 1549, "end": 1550, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 1549, "end": 1550, "ctxt": 0 }, "value": "U", "optional": false }, "constraint": null, "default": null } ] } }, { "type": "TsMethodSignature", "span": { "start": 1599, "end": 1681, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 1599, "end": 1603, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 1607, "end": 1631, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1609, "end": 1631, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1611, "end": 1631, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1612, "end": 1616, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1613, "end": 1616, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1615, "end": 1616, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1615, "end": 1616, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1618, "end": 1631, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1621, "end": 1631, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1621, "end": 1628, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1628, "end": 1631, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1629, "end": 1630, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1629, "end": 1630, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } }, { "type": "Identifier", "span": { "start": 1633, "end": 1667, "ctxt": 0 }, "value": "error", "optional": true, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1639, "end": 1667, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1641, "end": 1667, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1642, "end": 1652, "ctxt": 0 }, "value": "error", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1647, "end": 1652, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1649, "end": 1652, "ctxt": 0 }, "kind": "any" } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1654, "end": 1667, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1657, "end": 1667, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1657, "end": 1664, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1664, "end": 1667, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1665, "end": 1666, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1665, "end": 1666, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 1668, "end": 1680, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1670, "end": 1680, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1670, "end": 1677, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1677, "end": 1680, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1678, "end": 1679, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1678, "end": 1679, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 1603, "end": 1606, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 1604, "end": 1605, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 1604, "end": 1605, "ctxt": 0 }, "value": "U", "optional": false }, "constraint": null, "default": null } ] } }, { "type": "TsMethodSignature", "span": { "start": 1690, "end": 1803, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 1690, "end": 1694, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 1698, "end": 1722, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1700, "end": 1722, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1702, "end": 1722, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1703, "end": 1707, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1704, "end": 1707, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1706, "end": 1707, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1706, "end": 1707, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1709, "end": 1722, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1712, "end": 1722, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1712, "end": 1719, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1719, "end": 1722, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1720, "end": 1721, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1720, "end": 1721, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } }, { "type": "Identifier", "span": { "start": 1724, "end": 1749, "ctxt": 0 }, "value": "error", "optional": true, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1730, "end": 1749, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1732, "end": 1749, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1733, "end": 1743, "ctxt": 0 }, "value": "error", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1738, "end": 1743, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1740, "end": 1743, "ctxt": 0 }, "kind": "any" } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1745, "end": 1749, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1748, "end": 1749, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1748, "end": 1749, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } } } } }, { "type": "Identifier", "span": { "start": 1751, "end": 1789, "ctxt": 0 }, "value": "progress", "optional": true, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1760, "end": 1789, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 1762, "end": 1789, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 1763, "end": 1780, "ctxt": 0 }, "value": "preservation", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1775, "end": 1780, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1777, "end": 1780, "ctxt": 0 }, "kind": "any" } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1782, "end": 1789, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1785, "end": 1789, "ctxt": 0 }, "kind": "void" } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 1790, "end": 1802, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1792, "end": 1802, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1792, "end": 1799, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1799, "end": 1802, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 1800, "end": 1801, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1800, "end": 1801, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 1694, "end": 1697, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 1695, "end": 1696, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 1695, "end": 1696, "ctxt": 0 }, "value": "U", "optional": false }, "constraint": null, "default": null } ] } } ] } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 1832, "end": 1844, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 1845, "end": 1854, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 1845, "end": 1854, "ctxt": 0 }, "value": "n", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1846, "end": 1854, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1848, "end": 1854, "ctxt": 0 }, "kind": "number" } } } } ], "decorators": [], "span": { "start": 1815, "end": 1873, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 1855, "end": 1872, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1857, "end": 1872, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1857, "end": 1864, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1864, "end": 1872, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 1865, "end": 1871, "ctxt": 0 }, "kind": "number" } ] } } } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 1895, "end": 1907, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 1908, "end": 1917, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 1908, "end": 1917, "ctxt": 0 }, "value": "s", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1909, "end": 1917, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 1911, "end": 1917, "ctxt": 0 }, "kind": "string" } } } } ], "decorators": [], "span": { "start": 1878, "end": 1936, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 1918, "end": 1935, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1920, "end": 1935, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1920, "end": 1927, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1927, "end": 1935, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 1928, "end": 1934, "ctxt": 0 }, "kind": "string" } ] } } } }, { "type": "VariableDeclaration", "span": { "start": 1942, "end": 1974, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 1946, "end": 1973, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 1946, "end": 1956, "ctxt": 0 }, "value": "numPromise", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 1956, "end": 1973, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 1958, "end": 1973, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 1958, "end": 1965, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 1965, "end": 1973, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 1966, "end": 1972, "ctxt": 0 }, "kind": "number" } ] } } } }, "init": null, "definite": false } ] }, { "type": "VariableDeclaration", "span": { "start": 1979, "end": 2026, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 1983, "end": 2025, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 1983, "end": 1993, "ctxt": 0 }, "value": "newPromise", "optional": false, "typeAnnotation": null }, "init": { "type": "CallExpression", "span": { "start": 1996, "end": 2025, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { "start": 1996, "end": 2011, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 1996, "end": 2006, "ctxt": 0 }, "value": "numPromise", "optional": false }, "property": { "type": "Identifier", "span": { "start": 2007, "end": 2011, "ctxt": 0 }, "value": "then", "optional": false } }, "arguments": [ { "spread": null, "expression": { "type": "Identifier", "span": { "start": 2012, "end": 2024, "ctxt": 0 }, "value": "testFunction", "optional": false } } ], "typeArguments": null }, "definite": false } ] } ] } }, { "type": "TsModuleDeclaration", "span": { "start": 2070, "end": 2544, "ctxt": 0 }, "declare": false, "global": false, "id": { "type": "Identifier", "span": { "start": 2077, "end": 2079, "ctxt": 0 }, "value": "m6", "optional": false }, "body": { "type": "TsModuleBlock", "span": { "start": 2080, "end": 2544, "ctxt": 0 }, "body": [ { "type": "TsInterfaceDeclaration", "span": { "start": 2086, "end": 2260, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 2096, "end": 2103, "ctxt": 0 }, "value": "Promise", "optional": false }, "declare": false, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 2103, "end": 2106, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 2104, "end": 2105, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 2104, "end": 2105, "ctxt": 0 }, "value": "T", "optional": false }, "constraint": null, "default": null } ] }, "extends": [], "body": { "type": "TsInterfaceBody", "span": { "start": 2107, "end": 2260, "ctxt": 0 }, "body": [ { "type": "TsMethodSignature", "span": { "start": 2117, "end": 2163, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 2117, "end": 2121, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 2125, "end": 2149, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2127, "end": 2149, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 2129, "end": 2149, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 2130, "end": 2134, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2131, "end": 2134, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2133, "end": 2134, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2133, "end": 2134, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2136, "end": 2149, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2139, "end": 2149, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2139, "end": 2146, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2146, "end": 2149, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 2147, "end": 2148, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2147, "end": 2148, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 2150, "end": 2162, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2152, "end": 2162, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2152, "end": 2159, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2159, "end": 2162, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 2160, "end": 2161, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2160, "end": 2161, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 2121, "end": 2124, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 2122, "end": 2123, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 2122, "end": 2123, "ctxt": 0 }, "value": "U", "optional": false }, "constraint": null, "default": null } ] } }, { "type": "TsMethodSignature", "span": { "start": 2172, "end": 2254, "ctxt": 0 }, "readonly": false, "key": { "type": "Identifier", "span": { "start": 2172, "end": 2176, "ctxt": 0 }, "value": "then", "optional": false }, "computed": false, "optional": false, "params": [ { "type": "Identifier", "span": { "start": 2180, "end": 2204, "ctxt": 0 }, "value": "cb", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2182, "end": 2204, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 2184, "end": 2204, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 2185, "end": 2189, "ctxt": 0 }, "value": "x", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2186, "end": 2189, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2188, "end": 2189, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2188, "end": 2189, "ctxt": 0 }, "value": "T", "optional": false }, "typeParams": null } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2191, "end": 2204, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2194, "end": 2204, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2194, "end": 2201, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2201, "end": 2204, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 2202, "end": 2203, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2202, "end": 2203, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } }, { "type": "Identifier", "span": { "start": 2206, "end": 2240, "ctxt": 0 }, "value": "error", "optional": true, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2212, "end": 2240, "ctxt": 0 }, "typeAnnotation": { "type": "TsFunctionType", "span": { "start": 2214, "end": 2240, "ctxt": 0 }, "params": [ { "type": "Identifier", "span": { "start": 2215, "end": 2225, "ctxt": 0 }, "value": "error", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2220, "end": 2225, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 2222, "end": 2225, "ctxt": 0 }, "kind": "any" } } } ], "typeParams": null, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2227, "end": 2240, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2230, "end": 2240, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2230, "end": 2237, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2237, "end": 2240, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 2238, "end": 2239, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2238, "end": 2239, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } } } } } ], "typeAnn": { "type": "TsTypeAnnotation", "span": { "start": 2241, "end": 2253, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2243, "end": 2253, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2243, "end": 2250, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2250, "end": 2253, "ctxt": 0 }, "params": [ { "type": "TsTypeReference", "span": { "start": 2251, "end": 2252, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2251, "end": 2252, "ctxt": 0 }, "value": "U", "optional": false }, "typeParams": null } ] } } }, "typeParams": { "type": "TsTypeParameterDeclaration", "span": { "start": 2176, "end": 2179, "ctxt": 0 }, "parameters": [ { "type": "TsTypeParameter", "span": { "start": 2177, "end": 2178, "ctxt": 0 }, "name": { "type": "Identifier", "span": { "start": 2177, "end": 2178, "ctxt": 0 }, "value": "U", "optional": false }, "constraint": null, "default": null } ] } } ] } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 2283, "end": 2295, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 2296, "end": 2305, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 2296, "end": 2305, "ctxt": 0 }, "value": "n", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2297, "end": 2305, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 2299, "end": 2305, "ctxt": 0 }, "kind": "number" } } } } ], "decorators": [], "span": { "start": 2266, "end": 2324, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 2306, "end": 2323, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2308, "end": 2323, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2308, "end": 2315, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2315, "end": 2323, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 2316, "end": 2322, "ctxt": 0 }, "kind": "number" } ] } } } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 2346, "end": 2358, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 2359, "end": 2368, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 2359, "end": 2368, "ctxt": 0 }, "value": "s", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2360, "end": 2368, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 2362, "end": 2368, "ctxt": 0 }, "kind": "string" } } } } ], "decorators": [], "span": { "start": 2329, "end": 2387, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 2369, "end": 2386, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2371, "end": 2386, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2371, "end": 2378, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2378, "end": 2386, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 2379, "end": 2385, "ctxt": 0 }, "kind": "string" } ] } } } }, { "type": "FunctionDeclaration", "identifier": { "type": "Identifier", "span": { "start": 2409, "end": 2421, "ctxt": 0 }, "value": "testFunction", "optional": false }, "declare": true, "params": [ { "type": "Parameter", "span": { "start": 2422, "end": 2432, "ctxt": 0 }, "decorators": [], "pat": { "type": "Identifier", "span": { "start": 2422, "end": 2432, "ctxt": 0 }, "value": "b", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2423, "end": 2432, "ctxt": 0 }, "typeAnnotation": { "type": "TsKeywordType", "span": { "start": 2425, "end": 2432, "ctxt": 0 }, "kind": "boolean" } } } } ], "decorators": [], "span": { "start": 2392, "end": 2452, "ctxt": 0 }, "body": null, "generator": false, "async": false, "typeParameters": null, "returnType": { "type": "TsTypeAnnotation", "span": { "start": 2433, "end": 2451, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2435, "end": 2451, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2435, "end": 2442, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2442, "end": 2451, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 2443, "end": 2450, "ctxt": 0 }, "kind": "boolean" } ] } } } }, { "type": "VariableDeclaration", "span": { "start": 2458, "end": 2490, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 2462, "end": 2489, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 2462, "end": 2472, "ctxt": 0 }, "value": "numPromise", "optional": false, "typeAnnotation": { "type": "TsTypeAnnotation", "span": { "start": 2472, "end": 2489, "ctxt": 0 }, "typeAnnotation": { "type": "TsTypeReference", "span": { "start": 2474, "end": 2489, "ctxt": 0 }, "typeName": { "type": "Identifier", "span": { "start": 2474, "end": 2481, "ctxt": 0 }, "value": "Promise", "optional": false }, "typeParams": { "type": "TsTypeParameterInstantiation", "span": { "start": 2481, "end": 2489, "ctxt": 0 }, "params": [ { "type": "TsKeywordType", "span": { "start": 2482, "end": 2488, "ctxt": 0 }, "kind": "number" } ] } } } }, "init": null, "definite": false } ] }, { "type": "VariableDeclaration", "span": { "start": 2495, "end": 2542, "ctxt": 0 }, "kind": "var", "declare": false, "declarations": [ { "type": "VariableDeclarator", "span": { "start": 2499, "end": 2541, "ctxt": 0 }, "id": { "type": "Identifier", "span": { "start": 2499, "end": 2509, "ctxt": 0 }, "value": "newPromise", "optional": false, "typeAnnotation": null }, "init": { "type": "CallExpression", "span": { "start": 2512, "end": 2541, "ctxt": 0 }, "callee": { "type": "MemberExpression", "span": { "start": 2512, "end": 2527, "ctxt": 0 }, "object": { "type": "Identifier", "span": { "start": 2512, "end": 2522, "ctxt": 0 }, "value": "numPromise", "optional": false }, "property": { "type": "Identifier", "span": { "start": 2523, "end": 2527, "ctxt": 0 }, "value": "then", "optional": false } }, "arguments": [ { "spread": null, "expression": { "type": "Identifier", "span": { "start": 2528, "end": 2540, "ctxt": 0 }, "value": "testFunction", "optional": false } } ], "typeArguments": null }, "definite": false } ] } ] } } ], "interpreter": null }