mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 08:17:05 +00:00
Merge pull request #33216 from niedzielski/update/jest-each-templatize
[jest-each] Update: templatize .each()
This commit is contained in:
Vendored
+18
-2
@@ -1,5 +1,5 @@
|
||||
// Type definitions for Jest 24.0
|
||||
// Project: http://facebook.github.io/jest/
|
||||
// Project: https://jestjs.io
|
||||
// Definitions by: Asana <https://asana.com>
|
||||
// Ivo Stratev <https://github.com/NoHomey>
|
||||
// jwbay <https://github.com/jwbay>
|
||||
@@ -264,7 +264,23 @@ declare namespace jest {
|
||||
}
|
||||
|
||||
interface Each {
|
||||
(cases: any[]): (name: string, fn: (...args: any[]) => any, timeout?: number) => void;
|
||||
// Exclusively arrays.
|
||||
<T extends any[]>(cases: ReadonlyArray<T>): (
|
||||
name: string,
|
||||
fn: (...args: T) => any,
|
||||
timeout?: number
|
||||
) => void;
|
||||
// Not arrays.
|
||||
<T>(cases: ReadonlyArray<T>): (
|
||||
name: string,
|
||||
fn: (...args: T[]) => any,
|
||||
timeout?: number
|
||||
) => void;
|
||||
(cases: ReadonlyArray<ReadonlyArray<any>>): (
|
||||
name: string,
|
||||
fn: (...args: any[]) => any,
|
||||
timeout?: number
|
||||
) => void;
|
||||
(strings: TemplateStringsArray, ...placeholders: any[]): (
|
||||
name: string,
|
||||
fn: (arg: any) => any,
|
||||
|
||||
Reference in New Issue
Block a user