react-storybook-addon-props-combinations
react-storybook-addon-props-combinations copied to clipboard
Does not include Typescript typing
We are running Typscript in Storybook 5 and I'm getting this when trying to set up this addon.
storybook: TS7016: Could not find a declaration file for module 'react-storybook-addon-props-combinations'. '/Users/mattfelten/.../node_modules/react-storybook-addon-props-combinations/dist/index.js' implicitly has an 'any' type.
storybook: Try `npm install @types/react-storybook-addon-props-combinations` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-storybook-addon-props-combinations';`
Any plans on creating typings for this?
I got around it by following this guide for creating your own typings file for third-party modules, but it'd be great if this was already included.
@mattfelten mind sharing your solution?
Sure. I added ./.types/react-storybook-addon-props-combinations/index.d.ts that only contains
declare module 'react-storybook-addon-props-combinations';
And then made sure that the ./.types is being loaded in tsconfig.json as a typeRoot.
The link I posted earlier walked me through it.