-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Typescript Support #1166
Comments
@joscha I took a look at @leonidaX 's typescript example https://github.com/leonidax/storybook-ts-less-example I got it working on my machine and successfully added a Which leads me to these questions:
I'd love to get this squared away so that we can keep our Typescript users happy! |
Unfortunately not. There are some projects that try and auto-generate TS definitions from the API of a package (see https://github.com/ConquestArrow/dtsmake and https://github.com/Microsoft/dts-gen), but I am not sure how successful that is. The second one might work, but having
I was actually going to remove them from this repo altogether. |
@joscha OK, that makes sense. So is the typical flow then:
Or is there typically some coordination done between A and B? I'm assuming for popular libraries like |
|
@joscha thanks for the clarification and sorry for the newbie questions. Are you proposing that Storybook adopt option 3 then? And will you take point for that (at least in the short term)? |
@shilman I think |
@joscha That sounds perfect. When you remove the |
I wonder if we need to have some kind of process around changes to the API surface. It could be tricky to enforce it for all addons that are part of the main repo though. |
@tmeasday wouldn't all API changes be at least minor or major version bumps? |
You'd hope so! I'm not sure if there's a lot of religion about it right now though. Factoring in all the addons the surface area is pretty large. |
First of a few PRs to be opened: DefinitelyTyped/DefinitelyTyped#16970 - let's see what the DefinitelyTyped owners say. |
Knobs addon: DefinitelyTyped/DefinitelyTyped#17399 |
Links addon: DefinitelyTyped/DefinitelyTyped#17406 |
Options addon: DefinitelyTyped/DefinitelyTyped#17408 |
Notes addon: DefinitelyTyped/DefinitelyTyped#17409 |
All PRs opened - the DefinitelyTyped ones have been merged:
The ones removing the types in this repo are pending:
TODO:
|
Release will happen with 3.2 |
Thanks much @joscha ! Fingers crossed this is a big step forward for Typescript users of Storybook! |
Is @types/storybook/vue coming in near future? |
@chinchang I don't think anyone is working on these types actively at the moment, but the types setup should be fairly similar to the react ones - maybe you can open a PR against definitelytyped and we can take it from there? |
A colleague of mine (@pntgupta) opened a pull request for the same -> DefinitelyTyped/DefinitelyTyped#23048 |
Why
We keep getting Typescript compatibility issues like #1154 #1159 . We need a standardized way to create and maintain Typescript definitions for all
@storybook/*
packagesWhat
The text was updated successfully, but these errors were encountered: