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

x/rimbu/deep/mod.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@1.2.0/deep/mod.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]