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

[Bug] Typing don't work with SvelteKit project #234

Open
connerdassen opened this issue Nov 18, 2024 · 2 comments
Open

[Bug] Typing don't work with SvelteKit project #234

connerdassen opened this issue Nov 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@connerdassen
Copy link

Describe the bug

None of the typings work in a SvelteKit project, while they work fine in a standalone Svelte + Vite project.

When creating a standalone Svelte + Vite project using npm create vite@latest and installing Storybook with npx storybook@latest init, I get full type support and Intellisense works for defineMeta, setTemplate and Story component props.



However, when creating a SvelteKit project through npx sv create myapp and selecting Storybook to be installed, the typings do not work, and there is no Intellisense or typed component props.

Expected behavior

Typings work on Sveltre

Environment

  • OS: Windows 11
  • Node.js version: v22.11.0
  • addon-svelte-csf version: 5.0.0-next.11
@connerdassen connerdassen added the bug Something isn't working label Nov 18, 2024
@xeho91
Copy link
Collaborator

xeho91 commented Nov 19, 2024

Hm, that's off. Given how different TCmp generic type is in both cases. It feels like some of the dependencies are missing. Maybe typescript-svelte-plugin?

@JReinhold
Copy link
Collaborator

Do you have the necessary file at .sveltekit/tsconfig.json? That is only generated after starting the actual SvelteKit app once, or running svelte-kit sync. You might need to restart VSCode/The Extension Host after that file has been generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants