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

Remove reliance on svelte2tsx/svelte-jsx #665

Open
dummdidumm opened this issue Sep 18, 2024 · 0 comments
Open

Remove reliance on svelte2tsx/svelte-jsx #665

dummdidumm opened this issue Sep 18, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@dummdidumm
Copy link

Is your feature request related to a problem? Please describe.
The current smui typings reference svelte2tsx/svelte-jsx. This d.ts file is outdated as it's mainly related to Svelte 3. It's also not to be treated publicly, it's an implementation detail of the svelte2tsx package. I suggest to remove its usage from smui and therefore remove the dependency on svelte2tsx from the project.

Describe the solution you'd like
My hunch is that the references are from a time when svelte/elements (the import) didn't exist in Svelte yet. If you want to extend types for a button for example, you should instead import the corresponding interface from that import and use that. If it's purely for not having to type certain types like EventHandler, then those types should be recreated within your type definition file instead.

Also see https://svelte.dev/docs/typescript#enhancing-built-in-dom-types

Describe alternatives you've considered
If this doesn't work for some reason I'd like to understand better what this is exactly used for.

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

No branches or pull requests

1 participant