From 8cec4cdb6a48f0a12197153e03088f9feb2fb5da Mon Sep 17 00:00:00 2001 From: Tim Seckinger Date: Tue, 19 Mar 2019 10:21:39 +0000 Subject: [PATCH] more precise circus asyncError types (#8150) --- packages/jest-circus/src/types.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/jest-circus/src/types.ts b/packages/jest-circus/src/types.ts index 04a854cfca3f..87bf25bce902 100644 --- a/packages/jest-circus/src/types.ts +++ b/packages/jest-circus/src/types.ts @@ -27,7 +27,7 @@ export type TestContext = Record; export type Exception = any; // Since in JS anything can be thrown as an error. export type FormattedError = string; // String representation of error. export type Hook = { - asyncError: Exception; + asyncError: Error; fn: HookFn; type: HookType; parent: DescribeBlock; @@ -41,7 +41,7 @@ export type Event = name: 'include_test_location_in_result'; } | { - asyncError: Exception; + asyncError: Error; mode: BlockMode; name: 'start_describe_definition'; blockName: BlockName; @@ -52,14 +52,14 @@ export type Event = blockName: BlockName; } | { - asyncError: Exception; + asyncError: Error; name: 'add_hook'; hookType: HookType; fn: HookFn; timeout: number | undefined; } | { - asyncError: Exception; + asyncError: Error; name: 'add_test'; testName: TestName; fn?: TestFn;