Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/deep/tuple.ts>Tuple.append

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
function Tuple.append
import { Tuple } from "https://deno.land/x/rimbu@0.13.5/deep/tuple.ts";
const { append } = Tuple;

Returns the given tuple with the given values appended.

Examples

Example 1

const t = Tuple.of(1, 'a')
console.log(Tuple.append(t, true, 5))
// => [1, 'a', true, 5]

Type Parameters

T extends Tuple.Source
V extends readonly [unknown, ...unknown[]]

Parameters

tuple: T
  • the source tuple
...values: V
  • the values to append

Returns

readonly [...T, ...V]