effect-io-ai

Package: effect
Module: Tuple

Tuple.make

Creates a tuple from the provided arguments.

When to use

Use when you need a properly typed tuple without writing [a, b, c] as const or another manual cast.

Details

The returned value has the exact tuple type, with each element’s literal type preserved.

Example (Creating a tuple)

import { Tuple } from "effect"

const point = Tuple.make(10, 20, "red")
console.log(point) // [10, 20, "red"]

See

Signature

declare const make: <Elements extends ReadonlyArray<unknown>>(...elements: Elements) => Elements

Source

Since v2.0.0