effect-io-ai

Package: effect
Module: Order

Order.tuple

Similar to Promise.all but operates on Orders.

[Order<A>, Order<B>, ...] -> Order<[A, B, ...]>

This function creates and returns a new Order for a tuple of values based on the given Orders for each element in the tuple. The returned Order compares two tuples of the same type by applying the corresponding Order to each element in the tuple. It is useful when you need to compare two tuples of the same type and you have a specific way of comparing each element of the tuple.

Signature

declare const tuple: <T extends ReadonlyArray<Order<any>>>(...elements: T) => Order<Readonly<{ [I in keyof T]: [T[I]] extends [Order<infer A>] ? A : never; }>>

Source

Since v2.0.0