UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

10 lines 538 B
import type { TProperty } from "../../typescript/t-property.js"; /** * @public * Like `Array.reduce` but for dictionaries and without the requirement to return the value in the callback. * * @remarks * See {@link dictionaryCollect}. */ export declare function dictionaryCollect<TRet, TKey extends string | number | symbol, TItem>(items: TProperty<TKey, TItem>, collected: TRet, collect: (collected: TRet, item: TItem, key: TKey, index: number) => void, keys?: readonly TKey[]): TRet; //# sourceMappingURL=dictionary-collect.d.ts.map