Modify tests so that they verify the inference of filtered catch handlers

This commit is contained in:
Retsam
2017-12-13 15:45:49 -05:00
parent d73f413fb6
commit 42b8e18474
+2 -2
View File
@@ -352,7 +352,7 @@ class CustomError extends Error {
customField: number;
}
// $ExpectType Bluebird<void | Foo>
fooProm.catch(CustomError, (reason: CustomError) => {
fooProm.catch(CustomError, reason => {
let a: number = reason.customField;
});
@@ -366,7 +366,7 @@ class CustomErrorWithConstructor extends Error {
}
}
// $ExpectType Bluebird<void | Foo>
fooProm.catch(CustomErrorWithConstructor, (reason: CustomErrorWithConstructor) => {
fooProm.catch(CustomErrorWithConstructor, reason => {
let a: boolean = reason.arg1;
let b: number = reason.arg2;
});