Closed shafkathullah closed 2 years ago
@datepicker-react/hooks@^2.8.4
Describe the bug Wrong Typescript type annotations
https://codesandbox.io/s/datepickerreacthooks-example-06d
In below screenshot of the sample demo link provided in https://github.com/tomgreenwood1/react-datepicker/tree/master/packages/hooks it shows wrong type annotations making it unusable in .tsx projects, yet the results are correct
.tsx
xk
Its not 'wrong' as I thought, ie, type of day could be number too, so it got solved by narrowing using typeof operator.
day
number
typeof
@datepicker-react/hooks@^2.8.4
Describe the bug Wrong Typescript type annotations
https://codesandbox.io/s/datepickerreacthooks-example-06d
In below screenshot of the sample demo link provided in https://github.com/tomgreenwood1/react-datepicker/tree/master/packages/hooks it shows wrong type annotations making it unusable in
.tsx
projects, yet the results are correctxk