import { AsyncItemType } from './../base'; import { AnyIterable } from 'augmentative-iterable'; import { FluentAsyncIterable, FluentIterable } from '../base'; export type UnwindResult, V, Type extends 'sync' | 'async'> = { unwinded: { [k in Arr[number]]: V[k] extends (Type extends 'sync' ? Iterable : AnyIterable) ? AsyncItemType : V[k]; }; value: V; }; export interface UnwindFunction { /** * Unwinds the specified properties creating a new iterable with multiple items * for each combination of unwinded values for each original item * @param keys The keys to be unwinded * @returns The object chain */ >(...keys: A): Type extends 'sync' ? FluentIterable> : FluentAsyncIterable>; }