Options
All
  • Public
  • Public/Protected
  • All
Menu

Type aliases

Type aliases

Compulsory

Compulsory<L, depth>: Cast<CompulsoryPart<L, depth>, List>

Make that L's fields cannot be Nullable or Optional (it's like Required & NonNullable at once).

Type parameters

  • L: List

    to make compulsory

  • depth: Depth

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

returns

List

example

 * import {L} from 'ts-toolbelt'

type test0 = L.Compulsory<[1, 2, 3?, 4?]> // [1, 2, 3, 4]
type test1 = L.Compulsory<['a', 'b' | undefined, 'c', 'd', 'e' | null]> // ['a', 'b', 'c', 'd', 'e']

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