Installation
npm install --save @types/for-each
Summary
This package contains type definitions for for-each (https://github.com/Raynos/for-each).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/for-each.
declare function forEach<T = unknown, This = undefined>(arr: T[], callback: (this: This, value: T, index: number, array: T[]) => void, thisArg?: This): void;
declare function forEach<T = unknown, This = undefined>(arr: ArrayLike<T>, callback: (this: This, value: T, index: number, array: ArrayLike<T>) => void, thisArg?: This): void;
declare function forEach<V = unknown, K extends PropertyKey = PropertyKey, This = undefined>(obj: Record<K, V>, callback: (this: This, value: V, key: K, obj: Record<K, V>) => void, thisArg?: This): void;
declare function forEach<This = undefined>(str: string, callback: (this: This, value: string, index: number, str: string) => void, thisArg: This): void;
export = forEach;
Additional Details
- Last updated: Mon, 11 Sep 2023 20:03:06 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by Jordan Harband.