Storybook: Storybook Typescript preset

Created on 29 Mar 2019  路  9Comments  路  Source: storybookjs/storybook

We're rewriting Storybook in Typescript https://github.com/storybooks/storybook/issues/5030 which means we'll soon have native type support for every SB package. Let's also make it a one-liner to use Typescript with all of our supported view layers:

  • [x] Typescript preset with sensible defaults
  • [ ] Ensure that it works with every view layer
  • [x] Add to CLI sb init --story-format=csf-ts
  • [x] Auto-infer typescript in sb init if tsconfig.json exists
  • [ ] Add to documentation
  • [ ] Babel typescript option
cli feature request high priority in progress typescript

Most helpful comment

nice work

All 9 comments

Released @storybook/preset-typescript and need to update docs.

hey @shilman! great work! it would be good to clarify if this applies for just components written in tsx or also for stories.

also outline when transpileManager is useful vs not

Or --language typescript per #7492

Ol茅!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.0-alpha.21 containing PR #8451 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

happy to close it! congrats on shipping

@sw-yx Thanks!!! still lots to do -- gonna make TS 馃憣 in Storybook! One step closer tho!!

WIP gist: Storybook Docs w/ CRA & TypeScript

We've just released zero-config typescript support in 6.0-beta. Please upgrade and test it!

Thanks for your help and support getting this stable for release!

Since typescript is being built in, closing this! 馃帀

nice work

Was this page helpful?
0 / 5 - 0 ratings