1 | export declare function array<T>(array: T[] | ArrayLike<T>, body: (element: T, i: number) => void): void;
|
2 | export declare function object<TIn>(o: TIn, body: (element: TIn[keyof TIn], i: keyof TIn) => void): void;
|
3 | export declare function each<T>(array: T[] | ArrayLike<T>, body: (element: T, i: number) => void): any;
|
4 | export declare function each<T>(o: T, body: <U extends keyof T>(element: T[U], i: U) => void): any;
|
5 | export declare function grepArray<T>(it: T[] | ArrayLike<T>, body: (element: T, i: number) => boolean): T[];
|
6 | export declare type Proxy<T, U> = {
|
7 | [P in keyof T]: U;
|
8 | };
|
9 | export declare function grepObject<T>(o: T, body: (element: T[keyof T], i: keyof T) => boolean, asArray?: true): T[keyof T][];
|
10 | export declare function grepObject<T>(o: T, body: (element: T[keyof T], i: keyof T) => boolean, asArray: false): Partial<T>;
|
11 | export declare function grepObject<T>(o: T, body: (element: T[keyof T], i: keyof T) => boolean, asArray: boolean): Partial<T> | T[keyof T][];
|
12 | export declare function grep<T>(array: T[] | ArrayLike<T>, body: (element: T, i: number) => boolean): T[];
|
13 | export declare function grep<T>(o: T, body: <U extends keyof T>(element: T[U], i: U) => boolean): Partial<T>;
|
14 | export declare function grep<T, U extends keyof T>(o: T, body: (element: T[U], i: U) => boolean, asArray: true): T[U][];
|
15 | export declare function mapArray<T, U>(it: T[] | ArrayLike<T>, body: (element: T, i: number) => U): U[];
|
16 | export declare function mapObject<TIn, TResultValue>(o: TIn, body: (element: TIn[keyof TIn], i: keyof TIn) => TResultValue, asArray: true): TResultValue[];
|
17 | export declare function mapObject<TIn, TResultValue>(o: TIn, body: (element: TIn[keyof TIn], i: keyof TIn) => TResultValue, asArray?: false): {
|
18 | [P in keyof TIn]?: TResultValue;
|
19 | };
|
20 | export declare function mapObject<TIn, TResultValue>(o: TIn, body: (element: TIn[keyof TIn], i: keyof TIn) => TResultValue, asArray?: boolean): any;
|
21 | export declare function map<T, U>(array: T[] | ArrayLike<T>, body: (element: T, i: number) => U): U[];
|
22 | export declare function map<TIn, TKey extends keyof TIn, TResultValue>(o: TIn, body: (element: TIn[TKey], i: TKey) => TResultValue): Proxy<TIn, TResultValue>;
|
23 | export declare function map<TIn, TKey extends keyof TIn, TResultValue>(o: TIn, body: (element: TIn[TKey], i: TKey) => TResultValue, asArray: true): TResultValue[];
|