Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero effort type safety for inlined enhance callback #2410

Open
PatrickG opened this issue Jun 21, 2024 · 0 comments
Open

Zero effort type safety for inlined enhance callback #2410

PatrickG opened this issue Jun 21, 2024 · 0 comments

Comments

@PatrickG
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant