I'm quite new to TS but I think that it should be possible to use the keys of the FormProperties that is passed when initializing with const form = useForm({ username: { initial: "foo" } }); so that when accessing $form.values it knows that the only valid key is username.
If that is not possible, it would be great to at least provide some sort of generic argument to useForm so accessing an invalid key is not possible.
I'm quite new to TS but I think that it should be possible to use the keys of the
FormProperties
that is passed when initializing withconst form = useForm({ username: { initial: "foo" } });
so that when accessing$form.values
it knows that the only valid key isusername
.If that is not possible, it would be great to at least provide some sort of generic argument to
useForm
so accessing an invalid key is not possible.