Skip to content
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

Add typescript definitions for getStorybook() #753

Merged
merged 7 commits into from
Apr 20, 2017

Conversation

joscha
Copy link
Member

@joscha joscha commented Apr 10, 2017

2.35.3 add getStorybook() in 86d5819, but Typescript definitions were not updated.

Also configure was missing altogether, added in 0e9d7de

Issue:

stories.ts(6,23): error TS2339: Property 'getStorybook' does not exist on type 'typeof "./node_modules/@kadira/storybook/config/storybook"'.

when using getStorybook().

What I did

Added TS definition.

How to test

Run

test.ts, e.g.:

import * as storybook from '@kadira/storybook';
import './.storybook/config.js';

console.log(storybook.getStorybook());

with tsc.

`2.35.3` add `getStorybook()` in 86d5819, but Typescript definitions were not updated.
render: RenderFunction,
};

type StoryBucket = {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% sure about the naming here, happy to take any suggestion.

@joscha
Copy link
Member Author

joscha commented Apr 13, 2017

Updated to not overwrite the changes from #680

@joscha
Copy link
Member Author

joscha commented Apr 19, 2017

@ndelangen any chance to get this in if I rebase it again?

@ndelangen
Copy link
Member

Yeah, I think so!

@joscha
Copy link
Member Author

joscha commented Apr 19, 2017

👍 @ndelangen rebased!

@ndelangen ndelangen merged commit d919b03 into storybookjs:master Apr 20, 2017
@joscha joscha deleted the patch-1 branch April 20, 2017 07:36
@joscha
Copy link
Member Author

joscha commented Apr 20, 2017

ta!

@joscha
Copy link
Member Author

joscha commented Apr 21, 2017

any chance to get this in a release @ndelangen?

@ndelangen ndelangen added this to the v3.0.0 milestone Apr 21, 2017
@ndelangen
Copy link
Member

Yes this will get released in 3.0.0, I don't have a date for that yet, should be an alpha release soonish. My guess this at the end of this month or in the beginning of next month.

@shilman shilman added the misc label May 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants