Overload then, catch, finally definitions

This commit is contained in:
Max
2015-12-05 07:16:13 -05:00
parent b545524610
commit 14cc56099a
+7 -1
View File
@@ -12,7 +12,13 @@ declare module 'request-promise' {
import request = require('request');
import http = require('http');
interface RequestPromise extends request.Request, Promise<any> {
interface RequestPromise extends request.Request {
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>;
}