UNPKG

@walts81/linq-ts

Version:

Typescript/Javascript LINQ implementation library

9 lines (8 loc) 441 B
declare global { interface Array<T> { distinctByKey<TKey = T>(this: Array<T>, expression?: (item: T, index?: number) => TKey | T): T[]; distinct<T>(this: Array<T>, compare?: (a: T, b: T) => boolean): T[]; } } export declare function distinctByKey<T, TKey = T>(this: T[], expression?: (item: T, index?: number) => TKey | T): T[]; export declare function distinct<T>(this: T[], compare?: (a: T, b: T) => boolean): T[];