Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TryUnionType<T, M>

Type parameters

Hierarchy

  • TryUnionType

Implements

Index

Constructors

constructor

Properties

Private Optional _options

_options: Lazy<TryUnionTypeOptions<T, M>>

name

name: Name = name

variants

variants: M[]

Methods

Private _applyOptions

  • _applyOptions(): void

clone

  • clone(val: T): T

equals

  • equals(val1: T, val2: T): boolean

match

  • match(value: T): M | undefined

matchTrusted

  • matchTrusted(value: T): M

read

  • read<R>(reader: Reader<R>, raw: R): T

test

  • test(val: T): boolean

testError

  • testError(value: T): Error | undefined

variantRead

write

  • write<W>(writer: Writer<W>, value: T): W

Generated using TypeDoc