mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[p-timeout] Accept PromiseLike
This commit is contained in:
parent
42e514d82c
commit
c46e2cef09
4
types/p-timeout/index.d.ts
vendored
4
types/p-timeout/index.d.ts
vendored
@ -5,8 +5,8 @@
|
||||
|
||||
export = pTimeout;
|
||||
|
||||
declare function pTimeout<T>(input: Promise<T>, ms: number, message?: string | pTimeout.TimeoutError): Promise<T>;
|
||||
declare function pTimeout<T, R>(input: Promise<T>, ms: number, fallback: () => R | Promise<R>): Promise<T | R>;
|
||||
declare function pTimeout<T>(input: PromiseLike<T>, ms: number, message?: string | pTimeout.TimeoutError): Promise<T>;
|
||||
declare function pTimeout<T, R>(input: PromiseLike<T>, ms: number, fallback: () => R | Promise<R>): Promise<T | R>;
|
||||
|
||||
declare namespace pTimeout {
|
||||
class TimeoutError extends Error {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user