typeboxExample
Script
v3
Fork
1
2
3
4
5
6
7
8
import
{
Type
}
from
"npm:@sinclair/typebox"
const
querystring
=
Type
.
Object
(
{
v
:
Type
.
Optional
(
Type
.
Integer
(
{
minimum
:
0
}
)
)
,
}
)
console
.
log
(
JSON
.
stringify
(
querystring
)
)
// {"type":"object","properties":{"v":{"minimum":0,"type":"integer"}}}