Skip to main content
Module

x/ts_toolbelt_unofficial/mod.ts>T.Concat

👷 TypeScript's largest type utility library, now on Deno
Latest
type alias T.Concat
import { type T } from "https://deno.land/x/ts_toolbelt_unofficial@1.1.0/mod.ts";
const { Concat } = T;

Attach L1 at the end of L

Examples

Example 1

import {L} from 'ts-toolbelt.ts'

type test0 = L.Concat<[1, 2], [3, 4]> // [1, 2, 3, 4]
type test1 = L.Concat<[1, 2], [[3], 4]> // [1, 2, [3], 4]
type test2 = L.Concat<[1, 2], number[]> // [1, 2, ...number[]]
type test3 = L.Concat<readonly [1, 2], readonly [3]> // [1, 2, 3]

Type Parameters

L extends List
L1 extends List
definition: [...L, ...L1]