From 42b8e18474291dc7ee3e233b19b3c8cf60bac967 Mon Sep 17 00:00:00 2001 From: Retsam Date: Wed, 13 Dec 2017 15:45:49 -0500 Subject: [PATCH] Modify tests so that they verify the inference of filtered catch handlers --- types/bluebird/bluebird-tests.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/bluebird/bluebird-tests.ts b/types/bluebird/bluebird-tests.ts index 9dfb4fdc1f..c9c09221e8 100644 --- a/types/bluebird/bluebird-tests.ts +++ b/types/bluebird/bluebird-tests.ts @@ -352,7 +352,7 @@ class CustomError extends Error { customField: number; } // $ExpectType Bluebird -fooProm.catch(CustomError, (reason: CustomError) => { +fooProm.catch(CustomError, reason => { let a: number = reason.customField; }); @@ -366,7 +366,7 @@ class CustomErrorWithConstructor extends Error { } } // $ExpectType Bluebird -fooProm.catch(CustomErrorWithConstructor, (reason: CustomErrorWithConstructor) => { +fooProm.catch(CustomErrorWithConstructor, reason => { let a: boolean = reason.arg1; let b: number = reason.arg2; });