import { type FixDeepFunctionInfer, type AnyFunction } from "../common"; type ShapeTuple = readonly [ (input: GenericInput) => unknown, ...((input: GenericInput) => unknown)[] ]; type ComputesResult> = GenericShapeTuple extends readonly [ infer InferredFirst extends AnyFunction, ...infer InferredRest extends ShapeTuple | readonly [] ] ? InferredRest extends ShapeTuple ? ComputesResult extends infer inferredResult extends readonly any[] ? [ReturnType, ...inferredResult] : never : [ReturnType] : never; /** * Transforms a value into a tuple using a shape of functions. * * **Supported call styles:** * - Classic: `toTuple(input, shape)` → returns a tuple of results * - Curried: `toTuple(shape)` → returns a function waiting for the input * * Each function in the shape receives the same input. * The input value is not mutated. * * ```ts * A.toTuple( * 2, * [ * (value) => value + 1, * (value) => value * 2, * ], * ); // [3, 4] * * pipe( * "alpha", * A.toTuple( * [(value) => value.length], * ), * ); // [5] * ``` * * @see [`A.map`](https://utils.duplojs.dev/en/v1/api/array/map) For mapping arrays * @see https://utils.duplojs.dev/en/v1/api/array/toTuple * * @namespace A * */ export declare function toTuple>>(shapeObject: ShapeTuple> & GenericShapeTuple): (input: GenericInput) => ComputesResult>; export declare function toTuple>(input: GenericInput, shapeObject: FixDeepFunctionInfer, GenericShapeTuple>): ComputesResult; export {};