These Type-Definitions are for an old version of react-calendar-timeline, since the callbacks have far more extensive parameters. So every callback we define (i.e. a custom itemRenderer) is missing arguments (i.e. in this case itemContext, getItemProps etc), resulting in a failing compilation despite everything being right.
Additionally, though this might have changed with the versions, ids of timelineItems and timelineProps can be both numbers and strings. Thats an easy mistake given that the examples in the readme of react-calendar-timeline only use numbers, but while I have not checked the whole code basis we have used strings in these places wihout any issues for some time now.
As I dont know if thats the case for older releases too, and I honestly cant be bothered to update the whole interface for a component - which we will stop using soon anyways - to the newest version I make this issue here.
@types/react-calendar-timeline package and had problems.Definitions by: in index.d.ts) so they can respond.If you do not mention the authors the issue will be ignored.
You are correct that the ts defs are really wrong.
I made a lot of changes to the base library and had a lot of forks going so I wasn't interested in keeping these up to date as PRs on react-calendar-timeline got merged in.
I can try to get you a more up to date definition, but you may have to do some of your own work to get it up to standard to do a PR here. I've lost access to the private repo with the definitions, so I will reach out to the people there.
Hi @acemac,
thanks for the effort in providing the types for this library! May I ask where to find the types as stated in your last comment? I'm fine with them being not 100% correct.
The defs are not my IP. I made them for a commercial project that I'm no longer a part of. I don't have access to them anymore.
They were for the development branch of this fork which is VERY similar. There are a few additional features here that I never brought back. e.g. canvasBuffer which is documented in the readme
@kel30a @NeriedAU, can you check if the defs are okay to enter the public domain?
@kel30a @NeriedAU, can you check if the defs are okay to enter the public domain?
Please, these types would be very useful!
Most helpful comment
The defs are not my IP. I made them for a commercial project that I'm no longer a part of. I don't have access to them anymore.
They were for the development branch of this fork which is VERY similar. There are a few additional features here that I never brought back. e.g. canvasBuffer which is documented in the readme
@kel30a @NeriedAU, can you check if the defs are okay to enter the public domain?