{ "type": "Program", "statements": [ { "type": "TSInterfaceDeclaration", "body": { "type": "TSInterfaceBody", "body": [ { "type": "TSMethodSignature", "computed": false, "optional": false, "key": { "type": "Identifier", "name": "then", "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 9 } } }, "params": [ { "type": "Identifier", "name": "success", "typeAnnotation": { "type": "TSFunctionType", "params": [ { "type": "Identifier", "name": "value", "typeAnnotation": { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "T", "loc": { "start": { "line": 18, "column": 31 }, "end": { "line": 18, "column": 32 } } }, "loc": { "start": { "line": 18, "column": 31 }, "end": { "line": 18, "column": 32 } } }, "loc": { "start": { "line": 18, "column": 24 }, "end": { "line": 18, "column": 29 } } } ], "returnType": { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "U", "loc": { "start": { "line": 18, "column": 37 }, "end": { "line": 18, "column": 38 } } }, "loc": { "start": { "line": 18, "column": 37 }, "end": { "line": 18, "column": 38 } } }, "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 38 } } }, "optional": true, "loc": { "start": { "line": 18, "column": 13 }, "end": { "line": 18, "column": 20 } } } ], "typeParameters": { "type": "TSTypeParameterDeclaration", "params": [ { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "U", "loc": { "start": { "line": 18, "column": 10 }, "end": { "line": 18, "column": 11 } } }, "loc": { "start": { "line": 18, "column": 10 }, "end": { "line": 18, "column": 12 } } } ], "loc": { "start": { "line": 18, "column": 9 }, "end": { "line": 18, "column": 12 } } }, "typeAnnotation": { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "Promise", "loc": { "start": { "line": 18, "column": 41 }, "end": { "line": 18, "column": 48 } } }, "typeParameters": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "U", "loc": { "start": { "line": 18, "column": 49 }, "end": { "line": 18, "column": 50 } } }, "loc": { "start": { "line": 18, "column": 49 }, "end": { "line": 18, "column": 50 } } } ], "loc": { "start": { "line": 18, "column": 41 }, "end": { "line": 18, "column": 51 } } }, "loc": { "start": { "line": 18, "column": 41 }, "end": { "line": 18, "column": 48 } } }, "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 52 } } }, { "type": "TSMethodSignature", "computed": false, "optional": false, "key": { "type": "Identifier", "name": "then", "loc": { "start": { "line": 19, "column": 5 }, "end": { "line": 19, "column": 9 } } }, "params": [ { "type": "Identifier", "name": "success", "typeAnnotation": { "type": "TSFunctionType", "params": [ { "type": "Identifier", "name": "value", "typeAnnotation": { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "T", "loc": { "start": { "line": 19, "column": 31 }, "end": { "line": 19, "column": 32 } } }, "loc": { "start": { "line": 19, "column": 31 }, "end": { "line": 19, "column": 32 } } }, "loc": { "start": { "line": 19, "column": 24 }, "end": { "line": 19, "column": 29 } } } ], "returnType": { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "Promise", "loc": { "start": { "line": 19, "column": 37 }, "end": { "line": 19, "column": 44 } } }, "typeParameters": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "U", "loc": { "start": { "line": 19, "column": 45 }, "end": { "line": 19, "column": 46 } } }, "loc": { "start": { "line": 19, "column": 45 }, "end": { "line": 19, "column": 46 } } } ], "loc": { "start": { "line": 19, "column": 37 }, "end": { "line": 19, "column": 47 } } }, "loc": { "start": { "line": 19, "column": 37 }, "end": { "line": 19, "column": 44 } } }, "loc": { "start": { "line": 19, "column": 23 }, "end": { "line": 19, "column": 44 } } }, "optional": true, "loc": { "start": { "line": 19, "column": 13 }, "end": { "line": 19, "column": 20 } } } ], "typeParameters": { "type": "TSTypeParameterDeclaration", "params": [ { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "U", "loc": { "start": { "line": 19, "column": 10 }, "end": { "line": 19, "column": 11 } } }, "loc": { "start": { "line": 19, "column": 10 }, "end": { "line": 19, "column": 12 } } } ], "loc": { "start": { "line": 19, "column": 9 }, "end": { "line": 19, "column": 12 } } }, "typeAnnotation": { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "Promise", "loc": { "start": { "line": 19, "column": 50 }, "end": { "line": 19, "column": 57 } } }, "typeParameters": { "type": "TSTypeParameterInstantiation", "params": [ { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "U", "loc": { "start": { "line": 19, "column": 58 }, "end": { "line": 19, "column": 59 } } }, "loc": { "start": { "line": 19, "column": 58 }, "end": { "line": 19, "column": 59 } } } ], "loc": { "start": { "line": 19, "column": 50 }, "end": { "line": 19, "column": 60 } } }, "loc": { "start": { "line": 19, "column": 50 }, "end": { "line": 19, "column": 57 } } }, "loc": { "start": { "line": 19, "column": 5 }, "end": { "line": 19, "column": 61 } } }, { "type": "TSPropertySignature", "computed": false, "optional": false, "readonly": false, "key": { "type": "Identifier", "name": "value", "loc": { "start": { "line": 20, "column": 5 }, "end": { "line": 20, "column": 10 } } }, "typeAnnotation": { "type": "TSTypeReference", "typeName": { "type": "Identifier", "name": "T", "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 20, "column": 13 } } }, "loc": { "start": { "line": 20, "column": 12 }, "end": { "line": 20, "column": 13 } } }, "loc": { "start": { "line": 20, "column": 5 }, "end": { "line": 20, "column": 14 } } } ], "loc": { "start": { "line": 17, "column": 22 }, "end": { "line": 21, "column": 2 } } }, "id": { "type": "Identifier", "name": "Promise", "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 17, "column": 18 } } }, "extends": [], "typeParameters": { "type": "TSTypeParameterDeclaration", "params": [ { "type": "TSTypeParameter", "name": { "type": "Identifier", "name": "T", "loc": { "start": { "line": 17, "column": 19 }, "end": { "line": 17, "column": 20 } } }, "loc": { "start": { "line": 17, "column": 19 }, "end": { "line": 17, "column": 21 } } } ], "loc": { "start": { "line": 17, "column": 18 }, "end": { "line": 17, "column": 21 } } }, "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 21, "column": 2 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 22, "column": 1 } } }