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
TS definitions broken since the initialSettings
change.
#224
Comments
Oh no! Sorry about that (I didn't realize there were typings). I considered rewriting v6 in ts, but thought it was overkill (or "too big" of a change). I can maintain typings in this lib if it helps |
New typings should probably look like:
EDIT: Updating the definition above to incorporate the feedback in a comment below: #224 (comment) I wonder if you can see if these work? I can either figure out how to maintain in this lib or submit a PR to the one you linked. Would be nice to keep a better |
The I've never written a library type file but I think it should read:
|
Good call. I totally skipped reading this line:
I misread it as extending React.Props. Your suggestion looks correct to me. I updated my comment/definition above to incorporate your feedback |
I've tested your edited typings, they work.
I haven't used |
Here is what's passed to the callback: The documentation says start/end are |
Seems like I should keep this in this repo: Then potentially someday: |
Is there a PR with the updated typings anywhere? |
@JeremyCade - I will include the typings in this repo and publish a new package. I'm not sure about semver though: is this major/minor/patch? I might just do a patch release since it doesn't appear to be working for people w/ typescript. |
Actually- I'm looking at my build, and I'm gonna have to change the rollup script (or add a new copy script). I think I'm just gonna re-write the source in TS and use the generated typings. I'll publish a new major version afterwards. I'll try to get to this today if I have enough time |
Thanks @skratchdot. I'm sure you'll get to you as/when you have time. |
I just pushed a change for this and published a beta version. @floriancargoet / @JeremyCade - Can you try running this in your repo:
and see if things work for you? If it does, I will publish v7.0.0. Thanks! |
TypeScript correctly loads your new file but it has the old definitions.
Also,
|
Oh weird. They are "auto-generated" so I think I copied the wrong version into the |
Now I remember: I tried Anyways, I published commit 7c94185 as: Can you try again? I'm not sure how to "fix" You should be able to edit: Then try to figure out how to fix all the issues. |
Nevermind! I figured out how to type I went ahead and published v7.0.0: https://www.npmjs.com/package/react-bootstrap-daterangepicker I'm going to close this ticket. Please re-open if you encounter issues w/ v7. Thanks for helping out! |
The recent
initialSettings
change has broken the TypeScript definitions.Who is maintaining these type files?
The text was updated successfully, but these errors were encountered: