You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I want to have an array of these values that I can render as the options for a select input.
That map doesn't work because the type definition for union is so strict that it enforces that the array has at least 2 elements. This array does, but the compiler can't enforce that.
I want to do something like this:
Goal is to create a list of literal strings and enforce that the property contains one of these strings.
I could certainly do:
But I want to have an array of these values that I can render as the options for a select input.
That map doesn't work because the type definition for
union
is so strict that it enforces that the array has at least 2 elements. This array does, but the compiler can't enforce that.Any suggestions on the best way to proceed?
This issue is similar:
#2691
But I can't imagine using ~100 lines of code for this.
The text was updated successfully, but these errors were encountered: