Is your feature request related to a problem? Please describe.
Passing a form to a component as a prop could have a better Typescript experience.
// +page.svelte
<script lang='ts'>
import { superForm } from "sveltekit-superforms"
export let data
const { form } = superForm(data.form)
</script>
<MyComponent {form} />
// MyComponent.svelte
<script lang='ts'>
// what I wish I could do
export let form: SuperFormData<Infer<typeof schema>>
// what I have to do
export let form: SuperForm<Infer<typeof schema>>['form']
</script>
There could be a nice utility type possibly that acts like this
export let form: SuperFormData<typeof schema>
Describe the solution you'd like
See above
Describe alternatives you've considered
I could just do this which I also don't want to do
<script lang='ts'>
// just accept data.form and call superForm here instead
export let formData: PageData['form']
const {form} = superForm(data.form)
</script>
Is your feature request related to a problem? Please describe. Passing a form to a component as a prop could have a better Typescript experience.
There could be a nice utility type possibly that acts like this
export let form: SuperFormData<typeof schema>
Describe the solution you'd like See above
Describe alternatives you've considered I could just do this which I also don't want to do