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
6.2.5 addon-link - LinkTo - New TypeScript Errors #14539
Comments
Does anything change if you were to import We specify the types here: storybook/addons/links/react.d.ts Lines 1 to 2 in cc55b74
I'm not sure what we're doing wrong? I think the types were If the types were there before, I have no trouble simply removing the |
Same issue here. I can get it to build and work using, Previously, we had imported from When changing to named import |
As a workaround you could import both separately and combine them in a import LTImp, { LinkTo as LTDec } from '@storybook/addon-links/react';
const LinkTo: typeof LTDec = LTImp as any |
Egads!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-alpha.38 containing PR #17434 that references this issue. Upgrade today to the
|
Good golly!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.19 containing PR #17434 that references this issue. Upgrade today to the
|
Happening to me with SB v7 despite the PR. I commented the exclude array in
Any idea? |
@sneko can you supply a reproduction for 7.0? |
@ndelangen I ran into this issue as well. I've created an issue for it here where I created a reproduction: #20580 |
Describe the bug
Following the addon-link documentation captured here: https://www.npmjs.com/package/@storybook/addon-links
LinkTo
in@storybook/addon-link@6.2.5
now results in a TypeScript error:JSX element type 'LinkTo' does not have any construct or call signatures.
This issue did not exist in
@storybook/addon-link@6.1.21
To Reproduce
Steps to reproduce the behavior:
@storybook/addon-link@6.1.21
as a dependency in a TypeScript project@storybook/addon-link@6.2.25
Expected behavior
TypeScript errors do not occur in
addon-links@6.2+
Workaround
ts-ignore
commentAdditional Notes:
node_modules/@storybook/addon-links/react.d.ts
node_modules/@storybook/addon-links/react.js
The text was updated successfully, but these errors were encountered: