Nullable reference to another type
Hey! How can I reference other types that can be also null? Is it possible using the string syntax? I'm currently getting the "is unresolvable" error when I do
type("OtherType | null") which makes sense.3 Replies
I do it that way:
Do you start off with plain strings and in this type of case switch to the fluent syntax?
What if instead of null it was a more complex string with length constraints?
I'm working on a code generator for Arktype and trying to figure out what the most native output would look like
It seems strings are desirable but for cases like this I need to maintain also the fluent syntax... in which case a question is in place, should I ALWAYS use the fluent syntax?
Hmm, you probably want to define a scope for your types: https://arktype.io/docs/scopes
But I'm not that deep into ark yet and maybe @ssalbdivad should help me out 😉