UNPKG

552 BTypeScriptView Raw
1import { List } from './List';
2/**
3 * Attach `L1` at the end of `L`
4 * @param L to concat with
5 * @param L1 to be attached
6 * @returns [[List]]
7 * @example
8 * ```ts
9 * import {L} from 'ts-toolbelt'
10 *
11 * type test0 = L.Concat<[1, 2], [3, 4]> // [1, 2, 3, 4]
12 * type test1 = L.Concat<[1, 2], [[3], 4]> // [1, 2, [3], 4]
13 * type test2 = L.Concat<[1, 2], number[]> // [1, 2, ...number[]]
14 * type test3 = L.Concat<readonly [1, 2], readonly [3]> // [1, 2, 3]
15 * ```
16 */
17export declare type Concat<L extends List, L1 extends List> = [
18 ...L,
19 ...L1
20];