Hi, would you consider supplying also .d.ts files with your project in order to enable Intelisense support during debelopment? It would also allow to typecheck files during compilation. Thanks!
I've found this project https://github.com/KnisterPeter/react-to-typescript-definitions yet it does not support stateless components yet.
Hi, since any automatic way in this field is not very reliable I decided to create the typing file manually. Here is the gist:
https://gist.github.com/tomitrescak/6261ad27dbe43aad03b2497721d751f5
If you guys are interested we can include it in the package and add typings into package.json for all visual studio code / atom / typescript users for awesome intellisense.
{
...
"types": "config/typings.d.ts"
}
Also, it would be cool if someone would help and added documentation (JSDOC) onto all interface elements. Maybe we can somehow split the load? I did about half of the file with documentation.
Without documentation
interface IButtonContent extends SuiBlockElement {
hidden: boolean;
visible: boolean;
}
with documentation
interface IButtonContent extends SuiBlockElement {
/**
* Initially hidden, visible on hover
*
* @type {boolean}
*/
hidden: boolean;
/**
* Initially visible, hidden on hover
*
* @type {boolean}
*/
visible: boolean;
}
I have added it to my pull request.
I would merge a PR for complete and accurate typings.
Regarding your PR, please split the config and typings into 2 separate PRs. You can do so by creating two branches off of your master branch. One with the config work, and the other with the typings work. Then, you can open a PR for each.
@tomitrescak can you add it into dt until official merge ?
Guys, adding it to DT is a major pain the ... I tried, but it wants tests and all. I am too busy to go through that whole ordeal. I even looked at adding it to typings repository, but just going over the docs took me more than hour and I gave up.
Here is the latest version of mine (I am using a modified version from ..... I CAN'T find his username! .. sorry).
https://gist.github.com/tomitrescak/6261ad27dbe43aad03b2497721d751f5
Linking to the related PR: https://github.com/Semantic-Org/Semantic-UI-React/pull/674
Released in [email protected].
Most helpful comment
Guys, adding it to DT is a major pain the ... I tried, but it wants tests and all. I am too busy to go through that whole ordeal. I even looked at adding it to typings repository, but just going over the docs took me more than hour and I gave up.
Here is the latest version of mine (I am using a modified version from ..... I CAN'T find his username! .. sorry).
https://gist.github.com/tomitrescak/6261ad27dbe43aad03b2497721d751f5