mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-03 12:00:40 +08:00
when.d.ts - add ability to return primitive from catch callback
This commit is contained in:
1 parent
2c96e9e777
commit
93f6359ec9
2 files changed
+4
-1
No files matched your search
@@ -164,6 +164,9 @@ promise = when(1).catch((err: any) => when(2));
|
||||
promise = when(1).catch((err: any) => err.good, (err: any) => 2);
|
||||
promise = when(1).catch((err: any) => err.good, (err: any) => when(2));
|
||||
|
||||
promise = when(1).catch(Error, (err: any) => 2);
|
||||
promise = when(1).catch(Error, (err: any) => when(2));
|
||||
|
||||
//TODO: error constructor predicate
|
||||
|
||||
promise = when(1).otherwise((err: any) => 2);
|
||||
|
||||
Reference in new issue
Block a user