Hello
Thanks for this great library. When I use react-bootstrap-table, I can install @types/react-bootstrap-table
for the react-bootstrap-table-next, there seems no @types/types/react-bootstrap-table-next.
I'm using Typescript with react for a new project, is there any way to make the library work with typescript?
Thanks
@cbfrank @types/react-bootstrap-table is developed by other contributor not me, right now I have no plan to support TS, hope someone can help on it. Anyway, I'm also start to use TS in my company, maybe I can support the TS after I master on it 锛氾級
@AllenFang is this something that you're still interested in supporting? I've started to hack on this a bit, but not being familiar with all the intricacies of the lib I'm sure there are gaps in my knowledge. Would love some early feedback if you want to add TS support to the library still!
i have some hastily thrown together typedefs if you need. by no means releasable through DefinitelyTyped, but i'm happy to share if you like.
Any news about the support for TypeScript of this very nice lib?
Hello! I really needed typings for this great library, so I started working on them, see the current status here: https://github.com/cancerberoSgx/suitescript-types-tools-and-frameworks/blob/master/react-redux-client-app/src/components/data/react-bootstrap-table-next/types/types.d.ts
There's still much to do, but basic examples already work without compile errors. I will keep working on this, although I would like to know if the author is interested on adding these in this project itself or if should I contribute them in DefinitelyTyped .
Thanks and keep it up!
Hi there,
Any update on this issue?
After I installed the library, npm install @types/react-bootstrap-table-next, I tried to use "import BootstrapTable from 'react-bootstrap-table-next';" in my tsx file. Same as example showed in storybook.
I got error message says "Could not find a declaration file for module 'react-bootstrap-table-next'. '../node_modules/react-bootstrap-table-next/lib/index.js' implicitly has an 'any' type."
And I run npm install @types/react-bootstrap-table-next, but couldn't find any.
Does anyone has same issue? or how could I solve the problem?
Thanks
@ronz28 You are having that error because npm didn't install anything since @types/react-bootstrap-table-next does not exist.
@cancerberoSgx I've looked into your types and i think we should move on and push that to DefinitelyTyped. Even if it is incomplete, that would be enough for a first version.
It's been a long time since this issue was first opened and I (as many other TS-lovers) need this to upgrade from react-bootstrap-table. will try to contribute improving the type definitions frequently.
@dacevedo12 OK will try to put it to Definitely Typed in the short term, will keep you posted, thanks
@cancerberoSgx any updates on this?
lets add type definitions directly in repository so everybody can use TS w/o waiting for Definitely Typed update
@dacevedo12 I'm sorry I miss this for too long. I'm trying to build the project and then see how I can add my typings to it. npm install is currently failing for libsass so now I'm updating your dependencies
In the meanwhile, since I not sure I will have the time , these are the typings I've written.
I remember types for most public API was typechecking correctly and documented Ifrom sources or your docs. I think these types target all the projects so we need to divide it - one .d.ts for each project in the mono repo.
I assume it's OK to assume you want the typings inside the project and not externally like in DefinetelyTyped ? If not, please comment so I desist
I will integrate that as it is to feet the projects and after that continue working on completing the thing , formatting, etc. I assume that's your idea ? If not please tell me so I desist sine I have little time.
THanks and sorry again for the delay
Hey @cancerberoSgx those types look great!. Just like you said, we should get an ultimatum from @AllenFang to know whether he wants to maintain the type definitions here in the repo or if we should add them to the community-maintained DefinetelyTyped
@dacevedo12 OK, I standby then - since I'm not actively using the library I have little time or motivation to complete the typings, but once we know how to proceed I will
@cancerberoSgx Thanks for posting your types. I am using them in a project and have made a few additions. It would certainly be nice if we could get those definitions posted in this repo, because I would be more than happy to contribute. @dacevedo12 How long do you think we should be waiting before just adding them to DefinetelyTyped?
Let's just open a PR in DefinetelyTyped. I think it's better for the repo maintainer since he doesn't need to care about it and the community that can do faster changes or fixes if necessary.
@cancerberoSgx if you open a PR please link it here so everyone following this issue knows
Thanks in advance for your contribution!
Any news on this?
Hi there, just wondering if there was any update on the push of types to DefinitelyTyped.
I have a personal repo that I use for my types, https://github.com/MacroPower/PossiblyTyped
I put @cancerberoSgx 's code there and have been adding a bit here and there. Don't mean to credit steal or anything, if he wants to make a repo of his own and admin all this, more than OK with me.
The issue here is that the types are not comprehensive and they also need to conform to DefinitelyTyped guidelines. Right now, there's no way they would be merged. This is a pretty large package, so it's not exactly trivial. I certainly don't have time to do them myself, and I assume @cancerberoSgx doesn't either.
If anyone wants to work on this together, feel free to use my repo... Once the types are good enough, someone can open a PR with DefinitelyTyped.
Does anyone know if this subject advanced in some direction?
There are any plan to add these types definitions in an official module or not?
Thanks for all who put the types together for react-bootstrap-table-next.
Has anyone created a types file for the react-bootstrap-table2-toolkit by any chance?
@owen-stellar We use @cancerberoSgx 's base, developing the types as we need them. There are still lots of any which isn't ideal for publishing but it works.
hopefully on this thread people contributes towards the goal of publishing them on DefinitelyTyped
If someone is still interested in typings. I recently had to work on a typescript project using this library and created a typescript definition on the side. It is not perfect but works for most of my use cases. If anyone has ideas we could further improve on it. The type definitions were recently merged into the DefinitelyTyped repo so you can install them via npm install @types/react-bootstrap-table-next. There are also types for most of the utility packages like pagination and filters.
@dacevedoatfluid I wish I would have found your comment earlier... That would have been a major time saver 馃
Hi @gosticks,
I've just installed your types definition, thanks for your work !
I was wondering if you have planned to support exportCSV options ? It seems that exportCSV prop hasn't been defined in TableToolkitProps interface...
Again, thanks for your contribution 馃ぉ
Hey @Wait4Code,
it seemed I missed the CSV export somehow, I just added those definitions to my fork of DefinitelyTyped. I will also create a PR for the changes in the official repo but it will probably take 7 to 10 days before the PR is processed. So if you need the types sooner I would suggest just getting them from my fork:
https://github.com/gosticks/DefinitelyTyped/tree/feature/react-bootstrap-table-next.
So I tried installing react-bootstrap-table-next but the import says the module cannot be found... Does anyone have a working example of this?
Heres the error I get on build.
Cannot find module: 'react-bootstrap-table-next'. Make sure this package is installed.
@ccoffman-ebsco do you have both packages installed react-bootstrap-table-next and @types/react-bootstrap-table-next?
Hello people, I won't we working on typings for this (sorry) so (@MacroPower ) feel free to use my code as you wish, thanks.
Seems to me this issue can be closed
https://www.npmjs.com/package/@types/react-bootstrap-table-next
Most helpful comment
Let's just open a PR in DefinetelyTyped. I think it's better for the repo maintainer since he doesn't need to care about it and the community that can do faster changes or fixes if necessary.
@cancerberoSgx if you open a PR please link it here so everyone following this issue knows
Thanks in advance for your contribution!