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

Slot as JSX #568

Closed
euaaaio opened this issue Oct 7, 2021 · 8 comments · Fixed by #764
Closed

Slot as JSX #568

euaaaio opened this issue Oct 7, 2021 · 8 comments · Fixed by #764
Labels
design limitation question Further information is requested

Comments

@euaaaio
Copy link

euaaaio commented Oct 7, 2021

This warning highlights all slots:

JSX element type '__VLS_9' does not have any construct or call signatures.

A simple reproduction from a real project: https://github.com/euaaaio/repro-storybook-vue-volar-jsx

@euaaaio
Copy link
Author

euaaaio commented Oct 7, 2021

It’s enough to import @storybook/vue3 types into one of my stories to break the slots.

import type { Story, Meta } from '@storybook/vue3'

@johnsoncodehk
Copy link
Member

Thanks for the report, when you import @storybook/vue3, @types/react has been reference indirectly.

Currently not sure how can resolve in volar side. A solution in project side is that you can exclude all scripts that importing storybook like "exclude": ["**/*.stories.ts"].

Track: storybookjs/storybook#16213

@BreizhReloaded
Copy link

I'm experiencing the same without Storybook, on a Vite project, but it's VLS_30:

JSX element type '__VLS_30' does not have any construct or call signatures.

Any settings/imports to add?

@BreizhReloaded
Copy link

Ok, I found issue #558 and it looks very similar. I'm running v0.28.0 and vite/client is referenced.

@johnsoncodehk
Copy link
Member

@BreizhReloaded this problem should be already fixed, can you provide a repro case?

@BreizhReloaded
Copy link

I updated pretty much everything on my laptop, and it seems to be ok so far. So false alarm, sorry. I'll stay focus this week if anything happen. Thanks!

@euaaaio
Copy link
Author

euaaaio commented Oct 13, 2021

This tsconfig.json works for me. (empty types)

{
  "compilerOptions": {
    "types": []
  },
  "exclude": [
    "**/*.stories.ts",
  ]
}

@johnsoncodehk
Copy link
Member

johnsoncodehk commented Oct 14, 2021

Please move to #592 for related problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design limitation question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants