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
[addon-viewport] TypeScript types missing #8611
Comments
@screendriver mind issuing a small PR for this? |
As I already wrote I tried to open a pull request but had some serious thoughts about it. Should I just re-export everything from a non-existent |
@kroeder @gaetanmaisse @ndelangen can you advise? |
I think a good option is to move
This should not create breaking change and should also export TS types correctly :) |
Whoopee!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.0-alpha.47 containing PR #8848 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
ZOMG!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.7 containing PR #8848 that references this issue. Upgrade today to try it out! |
Describe the bug
The TypeScript types in
@storybook/addon-viewport
are not working because you are missing the types field in your package.json is missing like it is in knobs package.json. So when you try something likeimport { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
you getI tried to open a pull request but I was unsure because there is no
index.ts
inaddons/viewport/src/
and thetypes
property should point to one.What I am doing in my project is
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
so that would mean to re-export everything from theindex.ts
file.To Reproduce
Use TypeScript in your project and try to import
import { INITIAL_VIEWPORTS } from '@storybook/addon-viewport';
Expected behavior
Should compile
Screenshots
Code snippets
System:
Additional context
The text was updated successfully, but these errors were encountered: