bupkis
API
Assertions
Preparing search index...
bupkis
z
enum
Function enum
enum
<
const
T
extends
readonly
string
[]
>
(
values
:
T
,
params
?:
|
string
|
{
error
?:
string
|
$ZodErrorMap
<
$ZodIssueInvalidValue
<
unknown
>
>
;
message
?:
string
;
}
,
)
:
z
.
ZodEnum
<
{
[
k
in
string
]
:
{
[
k
in
string
]
:
k
}
[
k
]
}
>
Type Parameters
const
T
extends
readonly
string
[]
Parameters
values
:
T
Optional
params
:
|
string
|
{
error
?:
string
|
$ZodErrorMap
<
$ZodIssueInvalidValue
<
unknown
>
>
;
message
?:
string
;
}
string
{
error
?:
string
|
$ZodErrorMap
<
$ZodIssueInvalidValue
<
unknown
>
>
;
message
?:
string
;
}
Optional
error
?:
string
|
$ZodErrorMap
<
$ZodIssueInvalidValue
<
unknown
>
>
Optional
message
?:
string
Deprecated
This parameter is deprecated. Use
error
instead.
Returns
z
.
ZodEnum
<
{
[
k
in
string
]
:
{
[
k
in
string
]
:
k
}
[
k
]
}
>
enum
<
const
T
extends
Readonly
<
Record
<
string
,
EnumValue
>
>
>
(
entries
:
T
,
params
?:
|
string
|
{
error
?:
string
|
$ZodErrorMap
<
$ZodIssueInvalidValue
<
unknown
>
>
;
message
?:
string
;
}
,
)
:
z
.
ZodEnum
<
T
>
Type Parameters
const
T
extends
Readonly
<
Record
<
string
,
EnumValue
>
>
Parameters
entries
:
T
Optional
params
:
|
string
|
{
error
?:
string
|
$ZodErrorMap
<
$ZodIssueInvalidValue
<
unknown
>
>
;
message
?:
string
;
}
string
{
error
?:
string
|
$ZodErrorMap
<
$ZodIssueInvalidValue
<
unknown
>
>
;
message
?:
string
;
}
Optional
error
?:
string
|
$ZodErrorMap
<
$ZodIssueInvalidValue
<
unknown
>
>
Optional
message
?:
string
Deprecated
This parameter is deprecated. Use
error
instead.
Returns
z
.
ZodEnum
<
T
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
API
Assertions
GitHub
npm
bupkis
Loading...
Deprecated
This parameter is deprecated. Use
error
instead.