Search
Preparing search index...
The search index is not available
Kryo
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
"types/try-union"
TryUnionType
Class TryUnionType<T, M>
Type parameters
T
M
:
Type
<
T
>
Hierarchy
TryUnionType
Implements
IoType
<
T
>
TryUnionTypeOptions
<
T
,
M
>
Index
Constructors
constructor
Properties
_options
name
variants
Methods
_apply
Options
clone
equals
match
match
Trusted
read
test
test
Error
variant
Read
write
Constructors
constructor
new
Try
Union
Type
(
options
:
Lazy
<
TryUnionTypeOptions
<
T
,
M
>
>
)
:
TryUnionType
Parameters
options:
Lazy
<
TryUnionTypeOptions
<
T
,
M
>
>
Returns
TryUnionType
Properties
Private
Optional
_options
_options
:
Lazy
<
TryUnionTypeOptions
<
T
,
M
>
>
name
name
:
Name
= name
variants
variants
:
M
[]
Methods
Private
_apply
Options
_apply
Options
(
)
:
void
Returns
void
clone
clone
(
val
:
T
)
:
T
Parameters
val:
T
Returns
T
equals
equals
(
val1
:
T
, val2
:
T
)
:
boolean
Parameters
val1:
T
val2:
T
Returns
boolean
match
match
(
value
:
T
)
:
M
|
undefined
Parameters
value:
T
Returns
M
|
undefined
match
Trusted
match
Trusted
(
value
:
T
)
:
M
Parameters
value:
T
Returns
M
read
read<R>
(
reader
:
Reader
<
R
>
, raw
:
R
)
:
T
Type parameters
R
Parameters
reader:
Reader
<
R
>
raw:
R
Returns
T
test
test
(
val
:
T
)
:
boolean
Parameters
val:
T
Returns
boolean
test
Error
test
Error
(
value
:
T
)
:
Error
|
undefined
Parameters
value:
T
Returns
Error
|
undefined
variant
Read
variant
Read<R>
(
reader
:
Reader
<
R
>
, raw
:
R
)
:
VariantValue
<
T
,
M
>
Type parameters
R
Parameters
reader:
Reader
<
R
>
raw:
R
Returns
VariantValue
<
T
,
M
>
write
write<W>
(
writer
:
Writer
<
W
>
, value
:
T
)
:
W
Type parameters
W
Parameters
writer:
Writer
<
W
>
value:
T
Returns
W
Globals
"types/try-
union"
Try
Union
Type
constructor
_options
name
variants
_apply
Options
clone
equals
match
match
Trusted
read
test
test
Error
variant
Read
write
Try
Union
Type
Options
Variant
Value
Diff
Name
Test
With
Variant
Result
name
Generated using
TypeDoc