<Elements extends ReadonlyArray<unknown>>(...elements: Elements): ElementsCreates 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"]Source effect/Tuple.ts:471 lines
export const const make: <
Elements extends ReadonlyArray<unknown>
>(
...elements: Elements
) => Elements
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"]
make = <function (type parameter) Elements in <Elements extends ReadonlyArray<unknown>>(...elements: Elements): ElementsElements extends interface ReadonlyArray<T>ReadonlyArray<unknown>>(...elements: Elements extends ReadonlyArray<unknown>elements: function (type parameter) Elements in <Elements extends ReadonlyArray<unknown>>(...elements: Elements): ElementsElements): function (type parameter) Elements in <Elements extends ReadonlyArray<unknown>>(...elements: Elements): ElementsElements => elements: Elements extends ReadonlyArray<unknown>elementsReferenced by 2 symbols