mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-27 12:21:19 +08:00
Add when(x, f) overloads
This commit is contained in:
1 parent
d72601e320
commit
afce6f14e4
1 file changed
+4
Vendored
+4
@@ -7,6 +7,10 @@ declare function When<T>(value: When.Promise<T>): When.Promise<T>;
|
||||
declare function When<T>(value: When.Thenable<T>): When.Promise<T>;
|
||||
declare function When<T>(value: T): When.Promise<T>;
|
||||
|
||||
declare function When<T, U>(value: When.Promise<T>, transform: (val: T) => U): When.Promise<U>;
|
||||
declare function When<T, U>(value: When.Thenable<T>, transform: (val: T) => U): When.Promise<U>;
|
||||
declare function When<T, U>(value: T, transform: (val: T) => U): When.Promise<U>;
|
||||
|
||||
declare module When {
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user