declarative-js
Version:
_declarative-js_ is modern JavaScript library, that helps to: - tackle array transformation with built in JavaScript array api (e.g. `array.filter(toBe.unique())`), - provide a type-level solution for representing optional values instead of null referen
5 lines (4 loc) • 462 B
TypeScript
import { StringMap, Getter } from '../types';
import { Reducer } from '../array/reduce';
export declare const toObjectValueObject: <T>(getKey: Getter<T, string>) => (agr: StringMap<T>, value: T, index: number, array: T[]) => StringMap<T>;
export declare const toObjectAndValue: <T, R>(getKey: Getter<T, string>, getValue: Getter<T, R>, onDuplicate: Reducer.OnDuplicateFunction<R>) => (agr: StringMap<R>, value: T, index: number, array: T[]) => StringMap<R>;