From c4a01bd7672267dc293b0c574ef8c0bc5d31c3e8 Mon Sep 17 00:00:00 2001 From: Tom Mrazauskas Date: Sun, 5 Jun 2022 12:06:16 +0300 Subject: [PATCH] fix(@jest/types): replace constrain with default type in one of `each` overrides (#12905) --- CHANGELOG.md | 2 +- packages/jest-types/src/Global.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4e81b1b5385..aa62117c8601 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - `[jest]` Expose `Config` type ([#12848](https://github.com/facebook/jest/pull/12848)) - `[@jest/reporters]` Improve `GitHubActionsReporter`s annotation format ([#12826](https://github.com/facebook/jest/pull/12826)) -- `[@jest/types]` Infer argument types passed to `test` and `describe` callback functions from `each` tables ([#12885](https://github.com/facebook/jest/pull/12885)) +- `[@jest/types]` Infer argument types passed to `test` and `describe` callback functions from `each` tables ([#12885](https://github.com/facebook/jest/pull/12885), [#12905](https://github.com/facebook/jest/pull/12905)) ### Fixes diff --git a/packages/jest-types/src/Global.ts b/packages/jest-types/src/Global.ts index bc0716c14306..b99d659b4be7 100644 --- a/packages/jest-types/src/Global.ts +++ b/packages/jest-types/src/Global.ts @@ -86,11 +86,7 @@ interface Each { timeout?: number, ) => void; - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint - ( - strings: TemplateStringsArray, - ...expressions: Array - ): ( + (strings: TemplateStringsArray, ...expressions: Array): ( name: string | NameLike, fn: (arg: Record) => ReturnType, timeout?: number,