mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 15:27:05 +00:00
fix: allow to specify return types (#40449)
This commit is contained in:
committed by
Sheetal Nandi
parent
ede0512c20
commit
edc6059c48
Vendored
+7
-6
@@ -4,6 +4,7 @@
|
||||
// Joe Skeen <https://github.com/joeskeen>
|
||||
// Aya Morisawa <https://github.com/AyaMorisawa>
|
||||
// Matt R. Wilson <https://github.com/mastermatt>
|
||||
// Sergey Bakulin <https://github.com/vansergen>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.2
|
||||
|
||||
@@ -13,12 +14,12 @@ import errors = require('./errors');
|
||||
import Promise = require('bluebird');
|
||||
|
||||
declare namespace requestPromise {
|
||||
interface RequestPromise extends request.Request {
|
||||
then: Promise<any>["then"];
|
||||
catch: Promise<any>["catch"];
|
||||
finally: Promise<any>["finally"];
|
||||
cancel: Promise<any>["cancel"];
|
||||
promise(): Promise<any>;
|
||||
interface RequestPromise<T = any> extends request.Request {
|
||||
then: Promise<T>['then'];
|
||||
catch: Promise<T>['catch'];
|
||||
finally: Promise<T>['finally'];
|
||||
cancel: Promise<T>['cancel'];
|
||||
promise(): Promise<T>;
|
||||
}
|
||||
|
||||
interface RequestPromiseOptions extends request.CoreOptions {
|
||||
|
||||
Reference in New Issue
Block a user