-
Notifications
You must be signed in to change notification settings - Fork 59
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
Unintended overwrite of Svelte Kit's Typescript definitions #118
Comments
Bastian
added a commit
to Bastian/bstats-web
that referenced
this issue
May 2, 2021
Ah, thanks for the investigation, I was already wondering in my application where these type issues come from ;) |
larrybotha
added a commit
that referenced
this issue
May 2, 2021
…th official svelte2tsx defs fix #118
🎉 This issue has been resolved in version 1.10.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I can confirm that it got fixed. Thanks for the fast patch, great library, love it ;) |
I can also confirm that the bug is no longer present in the latest version. Thank you for the quick fix! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
When using Svelte Kit with Typescript,
svelte-check
, and this library, it seems like this library is overwriting Svelte Kit's Typescript definitions.You can see this when trying to use
sveltekit:prefetch
somewhere. You then get the following error when executingsvelte-check
:When you look closely, you can see that it's picking up the definition from here:
svelte-forms-lib/lib/svelte-jsx.d.ts
Line 777 in f846e04
which is also confirmed when checking the definition in VS Codes:
Steps to reproduce
npm init svelte@next my-app
)svelte-check
svelte-forms-lib
and import it somewheresvelte-check
Example Project
Here's a simple demo project that already performed the steps described above and nothing else: https://github.com/Bastian/svelte-forms-lib-bug
Possible fixes
I'm not familiar enough with Typescript's internals to know how to fix this.
If you know a workaround (e.g., how to tell TypeScript which definitions to use), I would very much appreciate it. :)
The text was updated successfully, but these errors were encountered: