mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
Update enzyme/enzyme.d.ts – forEach iterator function takes index as second argument (#13243)
* Update enzyme/enzyme-1.2.0.d.ts – forEach iterator function takes index as second argument * Update enzyme-1.2.0.d.ts Make index optional in forEach
This commit is contained in:
6
enzyme/enzyme-1.2.0.d.ts
vendored
6
enzyme/enzyme-1.2.0.d.ts
vendored
@@ -253,9 +253,9 @@ declare module "enzyme" {
|
||||
*
|
||||
* Returns itself.
|
||||
* @param fn A callback to be run for every node in the collection. Should expect a ShallowWrapper as the first
|
||||
* argument, and will be run with a context of the original instance.
|
||||
* argument, index as a second, and will be run with a context of the original instance.
|
||||
*/
|
||||
forEach(fn: (wrapper: this) => any): this;
|
||||
forEach(fn: (wrapper: this, index?: number) => any): this;
|
||||
|
||||
/**
|
||||
* Maps the current array of nodes to another array. Each node is passed in as a ShallowWrapper to the map
|
||||
@@ -470,4 +470,4 @@ declare module "enzyme" {
|
||||
export function describeWithDOM(description: String, fn: Function): void;
|
||||
|
||||
export function spyLifecycle(component: typeof Component): void;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user