-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Props being inferred as any since v7 #5042
Comments
I have the same issue. When building |
@floriancargoet Do you know if there is a temporary way to fix this until the a new version with the fix is released? This is causing build errors, so cant release. I assume that building it myself wont work since it will fail when deploying it via pipelines. |
@Christoffer-M in my project, locally, I copy in |
… On Thu, Oct 17, 2024 at 4:31 PM Florian Cargoët ***@***.***> wrote:
@Christoffer-M <https://github.com/Christoffer-M> in my project, locally,
I copy in node_modules/react-datepicker/dist the portal.d.ts I got by
cloning & building react-datepicker.
For an automated build, I'm thinking of using
https://www.npmjs.com/package/patch-package while waiting for a release.
—
Reply to this email directly, view it on GitHub
<#5042 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKY2KFIKM6K7NMIKHVFPPTZ37C5DAVCNFSM6AAAAABM4IJ6ZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJZG4YTQNZYHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@martijnrusschen You're a legend, thanks! 👍 |
Describe the bug
A number of props are inferred as
any
after updatingreact-datepicker
to v7. This makes it impossible to extend theDatePicker
component's props for a component that renders aDatePicker
.To Reproduce
Install react-datepicker v7 (7.3.0 at the moment of writing) and let TypeScript infer types for props that are not directly configured in the
DatePickerProps
interface.Expected behavior
The type is correctly inferred.
Screenshots
Additional context
TypeScript 5.5.4
The text was updated successfully, but these errors were encountered: