Adding storybook shows Type '{ class: string; }' is not assignable to type error
See original GitHub issueI added storybook to my vue project. Once I add I get error in vs code when I set class on an element.
When I do <div class=""></div>
I get
Type '{ class: string; }' is not assignable to type
'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'.
Property 'class' does not exist on type 'DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>'.
Did you mean 'className'?ts(2322)
When I hover over a div
, I see
(property) div: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>
in vs code.
This is a vue project with .vue
file.
This happens only when I add storybook. To add storybook, the command I used is
npx sb@next init --builder storybook-builder-vite
I don’t know what’s making vs code assume the code is React
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
string; }' is not assignable to type 'DetailedHTMLProps ...
It works when I run the app but it's annoying to see that error in vscode. Am I supposed to add some d.ts...
Read more >Adding storybook shows Type '{ class: string - Issuehunt
Adding storybook shows Type '{ class: string; }' is not assignable to type error #16998 ... Describe the bug I am using vue3/ts/vite/volar....
Read more >Make JSX typings an optional install as they conflict ... - GitHub
When migrating from React to Vue, types should not fail without installing them. ... Type '{ class: string; }' is not assignable to...
Read more >type 'void' is not assignable to type 'reactelement<any, any>
Error : Type 'void' is not assignable to type 'ReactNode' ... second problem is that a class decorator must return void or the...
Read more >typescript-cheatsheet - GitHub Pages
Basic Assign Types. String. Another fundamental part of creating programs in JavaScript for webpages and servers alike is working with textual data. As...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@khusseini can you please open a new issue and fill out the template?
@IanVS Adding this fixed it. See here: johnsoncodehk/volar#592