when.d.ts - add ability to return primitive from catch callback

This commit is contained in:
drinchev committed 2015-06-27 10:42:30 +02:00
1 parent 2c96e9e777
commit 93f6359ec9
2 files changed
+4 -1

No files matched your search

+3
View File
@@ -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);