Skip to content

Commit bdafa91

Browse files
committed
ISSUE-10577: Fix not required types in try/catch
1 parent 220fbeb commit bdafa91

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/jest-worker/src/workers/messageParent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default function messageParent(
1919
} else if (typeof parentProcess.send === 'function') {
2020
try {
2121
parentProcess.send([PARENT_MESSAGE_CUSTOM, message]);
22-
} catch (error: unknown) {
22+
} catch (error) {
2323
if (
2424
types.isNativeError(error) &&
2525
// if .send is a function, it's a serialization issue

packages/jest-worker/src/workers/processChild.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function reportSuccess(result: unknown) {
101101

102102
try {
103103
process.send([PARENT_MESSAGE_OK, result]);
104-
} catch (error: unknown) {
104+
} catch (error) {
105105
if (
106106
types.isNativeError(error) &&
107107
// if .send is a function, it's a serialization issue

0 commit comments

Comments
 (0)