-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlodash.d.ts
More file actions
39 lines (39 loc) · 1.43 KB
/
Copy pathlodash.d.ts
File metadata and controls
39 lines (39 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
declare module 'lodash' {
export function last<T>(array?: ArrayLike<T> | null): T | undefined;
export function isArray(value: any): value is any[];
export function isObject(value: any): boolean;
export function forEach<T>(
collection: T[] | object | null | undefined,
iteratee?: (value: any, key: any, collection: any) => any,
): T[] | object;
export function map<T, R>(
collection: T[] | object | null | undefined,
iteratee?: (value: T, key: any, collection: any) => R,
): R[];
export function filter<T>(
collection: T[] | object | null | undefined,
predicate?: (value: T, key: any, collection: any) => boolean,
): T[];
export function reduce<T, R>(
collection: T[] | object | null | undefined,
iteratee: (accumulator: R, value: T, key: any, collection: any) => R,
accumulator?: R,
): R;
export function some<T>(
collection: T[] | object | null | undefined,
predicate?: (value: T, key: any, collection: any) => boolean,
): boolean;
export function every<T>(
collection: T[] | object | null | undefined,
predicate?: (value: T, key: any, collection: any) => boolean,
): boolean;
export function find<T>(
collection: T[] | object | null | undefined,
predicate?: (value: T, key: any, collection: any) => boolean,
): T | undefined;
export function includes<T>(
collection: T[] | string | object | null | undefined,
value: T,
fromIndex?: number,
): boolean;
}