Replies: 1 comment
-
Same question for const inputs = conform.collection(something, { options, type: 'radio' })
inputs.map((input) => input.value) This is typed as a string, which is OK for passing it to an |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Disclaimer: I’m still finding my way around this package, but it looks really helpful, thanks.
In the following snippet of code:
the type of
something
(in the return value ofuseForm
) is correctly inferred as e.g.FieldConfig<'some' | 'thing' | undefined>
. I’d expect the type ofsomething
indefaultValue
to be restricted to either'some'
or'thing'
, as per the inferred type of the corresponding input value. However, I can pass any string value here.Would it make sense to further restrict the type to only allow for, in this case, the string literal union type?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions