-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
Bundled Svelte 4 types loaded in a Svelte 5 project and causing conflict #2493
Comments
Strictly speaking, I don't know whether this is because of svelte or vscode or typescript. I just know it's a new problem after upgrading svelte |
This seems to be caused by the Svelte for VSCode extension. It seems to be because of the conflict between the Svelte 4 type definition bundled by the Svelte extension and the workspace Svelte 5 types. Interestingly the type no longer conflicts in TypeScript 5.5+ but not because of the support for the JSDoc template tag. The actual type loaded is still the hidden |
@jasonlyu123 do you have an idea why our bundled types are loaded? Is it because of our |
It's like |
Since the global types now reference `svelte/...` imports, they need to be placed in the same context the users' Svelte package lives in. Else these imports would load the types of the Svelte version that comes bundled with the IDE. #2493 (side note: we had this problem before, when loading `svelte/elements`, and solved it through #9070, but that solution is not applicable here)
Since the global types now reference `svelte/...` imports, they need to be placed in the same context the users' Svelte package lives in. Else these imports would load the types of the Svelte version that comes bundled with the IDE. #2493 (side note: we had this problem before in #2109 when loading `svelte/elements`, but that solution is not applicable here)
Describe the bug
See title and repro
Work around is to add the types to the callbacks manually but that skips typechecking so not ideal.
Reproduction
node_modules/svelte/src/store/shared/index.js:
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: