Allow explicitly typing withForm props via a provided interface #1935
-
|
If my understanding is correct, the props passed to withForm are currently inferred from their usage. Would it be possible to explicitly provide a props interface instead, to improve developer experience? For example: withForm({
props: ({ form, foo, bar }: FooBarProps),
…
},
}) |
Beta Was this translation helpful? Give feedback.
Answered by
LeCarbonator
Dec 18, 2025
Replies: 1 comment 2 replies
-
|
You can type assert if that's what you mean. The withForm({
props: {} as MyAdditionalProps,
render: function Render({ form, additionalProp }) {/* ... */}
}) |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
aress31
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can type assert if that's what you mean. The
propsobject is not used at runtime.