UNPKG

@walts81/linq-ts

Version:

Typescript/Javascript LINQ implementation library

11 lines (10 loc) 490 B
declare global { interface Array<T> { toDictionary<TKey, TValue>(this: Array<T>, getKey: (item: T, index?: number) => TKey, getValue: (item: T, index?: number) => TValue, throwOnDuplicateKey?: boolean): { [key: string]: TValue; }; } } export declare function toDictionary<T, TKey, TValue>(this: T[], getKey: (item: T, index?: number) => TKey, getValue: (item: T, index?: number) => TValue, throwOnDuplicateKey?: boolean): { [key: string]: TValue; };