devtypes - v1.1.0
    Preparing search index...

    Type Alias ComposeMany<Fns>

    ComposeMany: Fns extends [infer F, infer G, ...(infer Rest)]
        ? F extends (...args: any[]) => any
            ? G extends (...args: any[]) => any
                ? ComposeMany<
                    [Compose<F, G>, ...Extract<Rest, ((...args: (...)[]) => any)[]>],
                >
                : never
            : never
        : Fns extends [infer F] ? F : never

    Compose multiple functions in sequence.

    Type Parameters

    • Fns extends ((...args: any[]) => any)[]

      Array of function types to compose

    Chains several functions together, ensuring type compatibility. The output of each function must match the input of the next. Used Compose recursively.

    1.1.0

    type F1 = ( x: number ) => string;
    type F2 = ( y: string ) => boolean;
    type F3 = ( z: boolean ) => Date;
    type ComposedMany = ComposeMany< [ F1, F2, F3 ] >; // ( arg: number ) => Date