Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
How to declare an optional schema? - arktype
a
arktype
•
3y ago
•
25 replies
OnkelTem
How to declare an optional schema?
I wonder if it
's possible to define a schema that is ok if data is undefined
.
E
.g
. in
:
declare
function
foo
(
a
?:
string
)
v
void
declare
function
foo
(
a
?:
string
)
v
void
how to declare a schema for
a
a
?
arktype
Join
This is a friendly space centered around ArkType, TypeScript's 1:1 validator (https://github.com/arktypeio/arktype)
860
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Why does an optional property add a " | undefined" instead of just being an optional property?
a
arktype / questions
2y ago
Extract schema inside an array
a
arktype / questions
14mo ago
Optional key
a
arktype / questions
2y ago