-
Notifications
You must be signed in to change notification settings - Fork 52
Typescript compatibility #144
Comments
Hey @mdcorriveau, thank you for reporting! Sounds you know a thing or 2 about typescript, would you be able to help us out by creating a PR? |
I've never done this before but perhaps we can add a type definition file to this repo which will add the method to the story type. I found this page in typescript documentation about merging type declarations. I'll check it out and comment here. |
I'll take some time to check this out too this monday the 3rd, i'll get back at you if I've found something ! |
storybookjs/storybook#33 Here's what the ts configuration of the original storybook module looks like : declare var module: any; // dangerous interface StoryDecorator { interface Story { export function addDecorator(decorator: StoryDecorator): void; They also have this line in the package.json : "typings": "./config/storybook.d.ts", |
It would be good to fix this issue. As a temp workaround you could cast |
Hi,
I'm currently converting my react application and storybook to typescript. I currently have a bunch of error with the addWithInfo which return this error :
TS2339:Property 'addWithInfo' does not exist on type 'Story'.
While react-storybook is already providing a storybook.d.ts file in their package, do you think it'll be a great idea to do the same with react-storybook-addon-info ?
Thanks
The text was updated successfully, but these errors were encountered: