Coda by Ian Macalinao
Preparing search index...
@macalinao/coda
enumStructVariantTypeNode
Function enumStructVariantTypeNode
enumStructVariantTypeNode
<
const
TStruct
extends
NestedTypeNode
<
StructTypeNode
<
StructFieldTypeNode
<
TypeNode
,
StandaloneValueNode
|
undefined
,
StructFieldDisplayNode
|
undefined
,
>
[]
,
>
,
>
,
const
TDisplay
extends
EnumVariantDisplayNode
|
undefined
=
undefined
,
>
(
name
:
string
,
struct
:
TStruct
,
discriminator
?:
number
,
options
?:
{
display
?:
TDisplay
}
,
)
:
EnumStructVariantTypeNode
<
TStruct
,
TDisplay
>
A variant of an enum that carries a struct payload (named fields).
Type Parameters
const
TStruct
extends
NestedTypeNode
<
StructTypeNode
<
StructFieldTypeNode
<
TypeNode
,
StandaloneValueNode
|
undefined
,
StructFieldDisplayNode
|
undefined
,
>
[]
,
>
,
>
const
TDisplay
extends
EnumVariantDisplayNode
|
undefined
=
undefined
Parameters
name
:
string
struct
:
TStruct
Optional
discriminator
:
number
Optional
options
:
{
display
?:
TDisplay
}
Returns
EnumStructVariantTypeNode
<
TStruct
,
TDisplay
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Coda by Ian Macalinao
Loading...
A variant of an enum that carries a struct payload (named fields).