@types/for-each
TypeScript icon, indicating that this package has built-in type declarations

0.3.3 • Public • Published

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.

index.d.ts

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: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Jordan Harband.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/for-each

Weekly Downloads

21,239

Version

0.3.3

License

MIT

Unpacked Size

4.06 kB

Total Files

5

Last publish

Collaborators

  • types