-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
typings in react-table? #207
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
Comments
If you wanted to add some type definitions to the repo, I think that would be great. My only requirement would be that they are compatible with both typescript and flow (or have different versions if that's not possible). |
I've honestly never added typings to a project - only to existing type definitions in DefinitelyTyped so I'd have to look into how to even do it. The DefinitelyTyped docs recommend that if a project doesn't have anything yet, typings should be added directly to the project. Let me work with this thing some more before I start adding things like project-wide types :) |
Okay sounds good :) Going to close this for now, but feel free to open a PR whenever you feel comfortable! |
I created the whole typing in typescript. It's pretty big, additionally I found some undocumented feature and documented "feature" which are not implemented (anymore). I created it because the only and currently the best table react package should at least have typings ;) I trust in the future of this package. |
Hello @aight8! |
Would love to see typings here. Its really difficult to use this in typescript without it. @aight8 I would also be interested in getting those from you. Have you considered publishing them to DefinitelyTyped? Or submitting a pull request here for them? |
This is a draft, very incomplete but it covers my (very humble) needs for now: https://gist.github.com/geowarin/204b0d3526ade379d41c70d2005c8847 @David-Mk You can add it to your project and go from here. I used generics to type the rows and the columns, it can be helpful if you explicitly type your columns. |
Sorry guys I had no time at all to read all the github issues the last days. Since the last big react-table update there are some BC's - so if you want to work on it or even take the effort and publish it on deftypes, here you go :) |
Submit a pr that follows convention and I'll accept it if it looks good to
everyone here. I personally don't plan on supporting it myself so whoever
submits it, prepare for the long haul ;)
…On Tue, May 23, 2017 at 4:18 PM Geoffroy Warin ***@***.***> wrote:
This is a draft, very incomplete but this covers my needs for now:
https://gist.github.com/geowarin/204b0d3526ade379d41c70d2005c8847
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#207 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFUmCSdLSXYk9TbnkdxG1yDEImvW73aqks5r81slgaJpZM4NAYvx>
.
|
First of all thank you @aight8 for the gist, its a great help already. But I have noticed that some of the typings are outdated. Is there anyone which is supporting the typescript definitions? |
@tannerlinsley what if there will be unit tests on typings? Will it help you to do minor changes in typings by yourself? And let's pretend that typings has a single source of truth in typescript (flow typings is generated) |
If you wrote the lib in typescript, you get the typings for free) |
All the projects I've done in UK use react + ts, none of my clients used flow either. |
Does anyone have types for flow? |
Problem Description
Not so much a problem but I've been using react-table for the last week or so and really like it, but it's missing types. I've been adding types here and there locally to help myself, but was wondering if there's anything on the roadmap. I can help out as I get more into it. In the meantime, I have a couple of utility functions I can add somewhere like:
Perhaps this kind of stuff is already in there somewhere, but I didn't notice.
@tannerlinsley - let me know.
The text was updated successfully, but these errors were encountered: