-
-
Notifications
You must be signed in to change notification settings - Fork 696
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
TypeScript: import formatDate and parseDate from react-day-picker/moment #895
TypeScript: import formatDate and parseDate from react-day-picker/moment #895
Conversation
Codecov Report
@@ Coverage Diff @@
## master #895 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 15 15
Lines 659 659
Branches 146 146
=====================================
Hits 659 659 Continue to review full report at Codecov.
|
I wonder if this has something to do with the following issue I am having (using v When trying to call Warning is: |
Not sure I understand why this works since the function funnels over to moment functions but this seemed to work for me and avoided displaying any warnings:
It didn't matter that my date string was moment-compatible. I tried the date returned by react-day-picker as well as a string that moment could parse such as '2019 July'. In any case, I hope my workaround is forward-compatible. |
@fivetwelve this change only affects the TypeScript compiler. It has no effect on how the JavaScript in this project runs. If you are getting a deprecation warning, that is from JavaScript, not from the TypeScript compiler. |
I could really use this! Hope it gets merged soon. |
any news regarding this PR? |
Is this fixed via #899? |
Closing as seems fixed. Please reopen if needed, thanks! |
I'm seeing this issue with version |
This allows TypeScript to understand the following import:
as specified in the documentation.