Merge pull request #7056 from mshmelev/patch-1

RequestPromise to extend Promise<T>
This commit is contained in:
Masahiro Wakame
2015-12-10 21:22:54 +09:00
+6 -3
View File
@@ -13,9 +13,12 @@ declare module 'request-promise' {
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>;
then<TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>;
then<TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): Promise<TResult>;
catch(onrejected?: (reason: any) => any | PromiseLike<any>): Promise<any>;
catch(onrejected?: (reason: any) => void): Promise<any>;
finally<TResult>(handler: () => PromiseLike<TResult>): Promise<any>;
finally<TResult>(handler: () => TResult): Promise<any>;
promise(): Promise<any>;
}