mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Overload then, catch, finally definitions
This commit is contained in:
Vendored
+7
-1
@@ -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>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user