© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Is it possible to globally set “arktype” so that string.url accepts “” and returns undifind? - arktype
a
arktype
•
3mo ago
•
1 reply
seba9989
Is it possible to globally set “arktype” so that string.url accepts “” and returns undifind?
I mean behavior in which string
.url would accept not only a URL but also an empty string
, and if it received an empty string
, it would return undefined
.
type
(
"string.url | ''"
).
pipe
(
s
=>
s
===
''
?
undefined
:
s)
type
(
"string.url | ''"
).
pipe
(
s
=>
s
===
''
?
undefined
:
s)
something like this
, but globally
.
I
'm counting on quick help
, thanks in advance
.
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
string.numeric.parse accepts empty strings and returns a NaN
a
arktype / questions
12mo ago
Validate string is URL
a
arktype / questions
3y ago
Globally set `configure({ actual: () => "" })`
a
arktype / questions
5mo ago
Is it possible to define a type that does this?
a
arktype / questions
13mo ago