mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 15:27:05 +00:00
make RequestPromise generic
The default Promise interface is a generic which is useful for specifying your expected return value from the promise resolving.
This commit is contained in:
+4
-4
@@ -9,10 +9,10 @@ import request = require('request');
|
||||
import http = require('http');
|
||||
|
||||
declare namespace requestPromise {
|
||||
interface RequestPromise extends request.Request {
|
||||
then: Promise<any>["then"];
|
||||
catch: Promise<any>["catch"];
|
||||
promise(): Promise<any>;
|
||||
interface RequestPromise<T = any> extends request.Request {
|
||||
then: Promise<T>["then"];
|
||||
catch: Promise<T>["catch"];
|
||||
promise(): Promise<T>;
|
||||
}
|
||||
|
||||
interface RequestPromiseOptions extends request.CoreOptions {
|
||||
|
||||
Reference in New Issue
Block a user