Options
All
  • Public
  • Public/Protected
  • All
Menu

Type aliases

Type aliases

Append

Append<L, A>: [L [], A]

Add an element A at the end of L.

Type parameters

  • L: List

    to append to

  • A: any

    to be added to

returns

List

example

import {L} from 'ts-toolbelt'

type test0 = L.Append<[1, 2, 3], 4> // [1, 2, 3, 4]
type test1 = L.Append<[], 'a'> // ['a']
type test2 = L.Append<readonly ['a', 'b'], 'c'> // ['a', 'b', 'c']
type test3 = L.Append<[1, 2], [3, 4]> // [1, 2, [3, 4]]

  • Inherited
  • Protected
  • Private
  • Static
  • Module
  • Object
  • Property
  • Function
  • Variable
  • Index
  • Type
  • Class
  • Interface
  • Enum
  • Constructor
  • Getter/Setter
Made with ❤️ by pirix-gh. Documentation generated by TypeDoc.