Options
All
  • Public
  • Public/Protected
  • All
Menu

Type aliases

Type aliases

Assign

Assign<L, Ls, depth, ignore, fill>: Cast<Assign<L, Ls, depth, ignore, fill>, List>

Assign a list of List into L with Merge. Merges from left to right, first items get overridden by the next ones (last-in overrides).

Type parameters

  • L: List

    to assign to

  • Ls: List<List>

    to assign

  • depth: Depth

    (?='flat') 'deep' to do it deeply

  • ignore: object

    (?=BuiltIn) types not to merge

  • fill: any

    (?=undefined) types of O to be replaced with ones of O1

returns

Object

example

import {L} from 'ts-toolbelt'

type test0 = Assign<[1, 2, 3], [[2, 1]]> // [2, 1, 3]
type test1 = Assign<[], [[1, 2, 3, 4], [2, 4, 6]]> // [2, 4, 6, 4]
type test2 = Assign<[0, 0, 0, 0, 0], [[0, 1], [0, 2, 0, 4?]]> // [0, 2, 0, 0 | 4, 0]

  • 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.