import { type Factory, type FactoryWithIndex, type FactoryWithRequiredInput } from '../getter/getter'; import { type AsyncMapFunction } from '../value/map'; /** * Factory that generates multiple values given a number of items to make. * Takes a count parameter and returns an array of generated items. */ export type ArrayFactory = FactoryWithRequiredInput; /** * Async version of ArrayFactory that returns a promise resolving to an array of items. */ export type AsyncArrayFactory = AsyncMapFunction>; /** * Factory that generates a value for each input value. * Takes an array of input values and returns an array of output values. */ export type ArrayInputFactory = FactoryWithRequiredInput; /** * Async version of ArrayInputFactory that returns a promise resolving to an array of output values. */ export type AsyncArrayInputFactory = AsyncMapFunction>; /** * Creates a new ArrayFactory that generates multiple values. * * @param factory - The factory function used to generate each item * @returns A function that takes a count parameter and returns an array of generated items */ export declare function arrayFactory(factory: Factory | FactoryWithIndex): ArrayFactory; /** * Creates an ArrayInputFactory that transforms input values into output values. * * @param factory - The factory function used to transform each input value * @returns A function that takes an array of input values and returns an array of output values */ export declare function arrayInputFactory(factory: FactoryWithRequiredInput): ArrayInputFactory; /** * Creates a factory that returns the items from the input array and returns null after the factory function has exhausted all array values. * * The factory can only be used once as it maintains internal state. * * @param array - The source array to pull values from * @returns A factory function that returns items from the array or null when exhausted */ export declare function terminatingFactoryFromArray(array: T[]): Factory; /** * Creates a factory that returns the items from the input array and returns the specified terminating value when the array is exhausted. * * @param array - The source array to pull values from * @param terminatingValue - The value to return when all array items have been consumed * @returns A factory function that returns items from the array or the terminating value when exhausted */ export declare function terminatingFactoryFromArray(array: T[], terminatingValue: E): Factory;