mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-13 13:30:28 +00:00
RequestPromise to extend Promise<T>
The current then/catch/finally in RequestPromise don't have proper definition. As a result `await` in Typescript 1.7 fails during compilation blaming that there's no proper `then` implementation.
This commit is contained in:
Vendored
+1
-4
@@ -12,10 +12,7 @@ declare module 'request-promise' {
|
||||
import request = require('request');
|
||||
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>;
|
||||
interface RequestPromise extends request.Request, Promise<any> {
|
||||
promise(): Promise<any>;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user