Skip to content

Commit

Permalink
fix(@jest/types): replace constrain with default type in one of `each…
Browse files Browse the repository at this point in the history
…` overrides (#12905)
  • Loading branch information
mrazauskas committed Jun 5, 2022
1 parent 9806c90 commit c4a01bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -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

Expand Down
6 changes: 1 addition & 5 deletions packages/jest-types/src/Global.ts
Expand Up @@ -86,11 +86,7 @@ interface Each<EachFn extends TestFn | BlockFn> {
timeout?: number,
) => void;

// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-constraint
<T extends unknown>(
strings: TemplateStringsArray,
...expressions: Array<T>
): (
<T = unknown>(strings: TemplateStringsArray, ...expressions: Array<T>): (
name: string | NameLike,
fn: (arg: Record<string, T>) => ReturnType<EachFn>,
timeout?: number,
Expand Down

0 comments on commit c4a01bd

Please sign in to comment.