mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
expose request-promise as a promise
This commit is contained in:
+2
-4
@@ -8,11 +8,9 @@ declare module 'request-promise-native' {
|
||||
import http = require('http');
|
||||
|
||||
namespace requestPromise {
|
||||
interface RequestPromise extends request.Request {
|
||||
then<TResult>(onfulfilled?: (value: any) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult> | void): Promise<TResult>;
|
||||
catch(onrejected?: (reason: any) => any | PromiseLike<any> | void): Promise<any>;
|
||||
type RequestAndPromise<T> = request.Request & Promise<T>
|
||||
interface RequestPromise extends RequestAndPromise<any> {
|
||||
promise(): Promise<any>;
|
||||
cancel(): void;
|
||||
}
|
||||
|
||||
interface RequestPromiseOptions extends request.CoreOptions {
|
||||
|
||||
Reference in New Issue
Block a user