foreach-prop
Version:
Array-like methods for objects
11 lines • 1.01 kB
TypeScript
export declare type Anything = any;
export declare type Key = Extract<keyof Anything, string | number>;
export declare type Extra = Anything[];
export declare type ImmutableObject<K extends Key, V> = Readonly<Record<K, V>>;
export declare type MapCallback<V, K extends Key, E extends Extra, TH = Anything, R = Anything> = (this: TH, value: V, key: K, ...extra: E) => R;
export declare type ForEachCallback<V, K extends Key, E extends Extra, TH = Anything> = MapCallback<V, K, E, TH, void>;
export declare type FilterCallback<V, K extends Key, E extends Extra, TH = Anything> = MapCallback<V, K, E, TH, Anything>;
export declare type WrappedFilterCallback<K extends Key, R = Anything> = (key: K) => R;
export declare type ReduceCallback<V, K extends Key, E extends Extra, TH = Anything, R = Anything> = (this: TH, prev: R, value: V, key: K, ...extra: E) => R;
export declare type WrappedReduceCallback<K extends Key, R = Anything> = (key: K, result: R | undefined) => R;
//# sourceMappingURL=types.d.ts.map