-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
SvelteKit/TypeScript no longer accepts interfaces inside the script tag after module updates. #15912
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
Comments
|
Here is my newest tests: This is the version before module updates:
I have only tested with EDIT: My latest version seems to work when installing modules with So this appears to be a |
I'm also experiencing build errors across the board after updating from @sveltejs/kit 2.20.8 to 2.21.0 |
Had the same problem but seems fixed with svelte 5.29.0 that released 2 hours ago (and kit 2.21.0). |
Still not working for me with latest @sveltejs/kit 2.21.0 and svelte 5.30.1 on Bun. Downgrade to @sveltejs/kit =2.20.8 and it works again (after clearing .svelte-kit folder). |
Can anyone provide a reproduction please? |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I had a working component library, but after updating the modules to the latest versions, Svelte/SvelteKit/TypeScript no longer lets me use
interface Props
. The GitHub repository still contains the previous version of the code. Here's an example of how I used TypeScript before: Breadcrumb, Button (same as the example here).I tried changing all
interface Props
totype Props =
, but that didn’t help. I also tried using a separate file for types ($lib/types.ts
), but that didn’t work either.Here are my module upgrades:
Error 1
Error 2
This happened after I moved all types to their own file and imported them from there.
Example of my new import:
Here is my interface from
types.ts
tsconfig
Reproduction
ncu -u
or update the modules as shown above.yarn
yarn build
Logs
System Info
Severity
blocking an upgrade
The text was updated successfully, but these errors were encountered: