import { AsyncMapper, Mapper } from 'augmentative-iterable'; import { FluentAsyncIterable, FluentIterable } from '../base'; export interface DistinctByFunction { /** * Returns distinct elements from the iterable from a certain list of projections
* Examples:
* * `fluent([{ a: 1, b: 2, c: 1}, { a: 1, b: 2, c: 2}]).distinct()` yields *{ a: 1, b: 2, c: 1 }*
* @typeparam R The type of the data the element equality is based on. * @param mappers The projections to use to determine element equality. * @returns The [[FluentIterable]] of the distinct elements. */ (...mappers: Array | keyof T>): FluentIterable; } export interface AsyncDistinctByFunction { /** * Returns distinct elements from the iterable from a certain list of projections
* Examples:
* * `fluent([{ a: 1, b: 2, c: 1}, { a: 1, b: 2, c: 2}]).distinct()` yields *{ a: 1, b: 2, c: 1 }*
* @typeparam R The type of the data the element equality is based on. * @param mappers The projections to use to determine element equality. * @returns The [[FluentIterable]] of the distinct elements. */ (...mappers: Array | keyof T>): FluentAsyncIterable; }