sveltejs/language-tools

Zero effort type safety for inlined `enhance` callback

Opened this issue · 0 comments

Description

It would be nice if the inlined enhance callback could be auto typed to the SubmitFunction type from ./$types in +page.svelte files.
Since typescript in the template is not supported in Svelte < 5, it would probably only be possible for projects that use Svelte 5. Or is it possible with JSDoc?

Proposed solution

Auto type the callback.

Alternatives

No response

Additional Information, eg. Screenshots

No response