zodExample
Script
v17
Fork
1
2
3
4
5
6
export
const
zodExample
=
(
async
(
)
=>
{
const
z
=
await
import
(
"npm:zod"
)
;
await
setTimeout
(
(
)
=>
{
}
,
100
)
;
const
x
=
z
.
object
(
{
test
:
z
.
string
(
)
}
)
;
// type .object after z
return
x
.
safeParse
(
{
test
:
"bar"
}
)
;
}
)
(
)
;