import { AnyIterable, Mapper } from 'augmentative-iterable'; import { FluentAsyncIterable, FluentIterable } from '../base'; export interface CombineFunction { /** * Join the iterable with another one, returning a new iterable with a NxN combination * @param iterable The iterable to be combined */ (iterable: Iterable): FluentIterable<[T, U]>; /** * Join the iterable with another one, returning a new iterable with the inner matching combinations * @param iterable The right iterable to be combined * @param keyA A mapper that returns the key map value from the left iterable * @param keyB A mapper that returns the key map value from the right iterable */ (iterable: Iterable, keyA: Mapper, keyB: Mapper): FluentIterable<[T, U]>; /** * Join the iterable with another one, returning a new iterable with the inner matching combinations * @param iterable The right iterable to be combined * @param keyA A property name with value will be used as for comparison with the key of the second iterable * @param keyB A mapper that returns the key map value from the right iterable */ (iterable: Iterable, keyA: keyof T, keyB: Mapper): FluentIterable<[T, U]>; /** * Join the iterable with another one, returning a new iterable with the inner matching combinations * @param iterable The right iterable to be combined * @param keyA A mapper that returns the key map value from the left iterable * @param keyB A property name with value will be used as for comparison with the key of the first iterable */ (iterable: Iterable, keyA: Mapper, keyB: keyof U): FluentIterable<[T, U]>; /** * Join the iterable with another one, returning a new iterable with the inner matching combinations * @param iterable The right iterable to be combined * @param keyA A property name with value will be used as for comparison with the key of the second iterable * @param keyB A property name with value will be used as for comparison with the key of the first iterable */ (iterable: Iterable, keyA: keyof T, keyB: keyof U): FluentIterable<[T, U]>; } export interface AsyncCombineFunction { /** * Join the iterable with an async one, returning a new async iterable with a NxN combination * @param iterable The iterable to be combined */ (iterable: AnyIterable): FluentAsyncIterable<[T, U]>; /** * Join the iterable with another one, returning a new async iterable with the inner matching combinations * @param iterable The right iterable to be combined * @param keyA A mapper that returns the key map value from the left iterable * @param keyB A mapper that returns the key map value from the right iterable */ (iterable: AnyIterable, keyA: Mapper, keyB: Mapper): FluentAsyncIterable<[T, U]>; /** * Join the iterable with another one, returning a new async iterable with the inner matching combinations * @param iterable The right iterable to be combined * @param keyA A property name with value will be used as for comparison with the key of the second iterable * @param keyB A mapper that returns the key map value from the right iterable */ (iterable: AnyIterable, keyA: keyof T, keyB: Mapper): FluentAsyncIterable<[T, U]>; /** * Join the iterable with another one, returning a new async iterable with the inner matching combinations * @param iterable The right iterable to be combined * @param keyA A mapper that returns the key map value from the left iterable * @param keyB A property name with value will be used as for comparison with the key of the first iterable */ (iterable: AnyIterable, keyA: Mapper, keyB: keyof U): FluentAsyncIterable<[T, U]>; /** * Join the iterable with another one, returning a new async iterable with the inner matching combinations * @param iterable The right iterable to be combined * @param keyA A property name with value will be used as for comparison with the key of the second iterable * @param keyB A property name with value will be used as for comparison with the key of the first iterable */ (iterable: AnyIterable, keyA: keyof T, keyB: keyof U): FluentAsyncIterable<[T, U]>; }