Skip to content

Add typescript definitions for getStorybook()#753

Merged
ndelangen merged 7 commits intostorybookjs:masterfrom
joscha:patch-1
Apr 20, 2017
Merged

Add typescript definitions for getStorybook()#753
ndelangen merged 7 commits intostorybookjs:masterfrom
joscha:patch-1

Conversation

@joscha
Copy link
Copy Markdown
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.
Comment thread config/storybook.d.ts
render: RenderFunction,
};

type StoryBucket = {
Copy link
Copy Markdown
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
Copy Markdown
Member Author

joscha commented Apr 13, 2017

Updated to not overwrite the changes from #680

@joscha
Copy link
Copy Markdown
Member Author

joscha commented Apr 19, 2017

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

@ndelangen
Copy link
Copy Markdown
Member

Yeah, I think so!

@joscha
Copy link
Copy Markdown
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
Copy Markdown
Member Author

joscha commented Apr 20, 2017

ta!

@joscha
Copy link
Copy Markdown
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
Copy Markdown
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