Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@jest/types): replace constrain with default type in one of each overrides #12905

Merged
merged 3 commits into from Jun 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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