RequestPromise to extend Promise<T>

The current then/catch/finally in RequestPromise don't have proper definition. As a result `await` in Typescript 1.7 fails during compilation blaming that there's no proper `then` implementation.
This commit is contained in:
Max
2015-12-04 14:04:52 -05:00
parent e5a27ea95e
commit b545524610
+1 -4
View File
@@ -12,10 +12,7 @@ declare module 'request-promise' {
import request = require('request');
import http = require('http');
interface RequestPromise extends request.Request {
then(onFulfilled: Function, onRejected?: Function): Promise<any>;
catch(onRejected: Function): Promise<any>;
finally(onFinished: Function): Promise<any>;
interface RequestPromise extends request.Request, Promise<any> {
promise(): Promise<any>;
}