diff --git a/types/jest/index.d.ts b/types/jest/index.d.ts index 29b3210cc2..b5ee488b2b 100644 --- a/types/jest/index.d.ts +++ b/types/jest/index.d.ts @@ -1,5 +1,5 @@ // Type definitions for Jest 24.0 -// Project: http://facebook.github.io/jest/ +// Project: https://jestjs.io // Definitions by: Asana // Ivo Stratev // jwbay @@ -263,7 +263,20 @@ declare namespace jest { } interface Each { - (cases: any[]): (name: string, fn: (...args: any[]) => any) => void; + // Exclusively arrays. + (cases: ReadonlyArray): ( + name: string, + fn: (...args: T) => any + ) => void; + // Not arrays. + (cases: ReadonlyArray): ( + name: string, + fn: (...args: T[]) => any + ) => void; + (cases: ReadonlyArray>): ( + name: string, + fn: (...args: any[]) => any + ) => void; (strings: TemplateStringsArray, ...placeholders: any[]): ( name: string, fn: (arg: any) => any