Hacker0x01 / react-datepicker

A simple and reusable datepicker component for React
https://reactdatepicker.com/
MIT License
7.89k stars 2.23k forks source link

[typescript-migration] week_picker_test.test.js and some tests #4810

Closed yuki0410-dev closed 1 month ago

yuki0410-dev commented 1 month ago

name: Migrate time.jsx

Description

Linked issue: #4700

Changes week_picker_test.test .js and some tests ware migrated to ts

The props type information is now correct and is being corrected together.

Contribution checklist

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.04%. Comparing base (2d66a92) to head (3191bd5).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #4810 +/- ## ========================================== - Coverage 96.04% 96.04% -0.01% ========================================== Files 28 28 Lines 2882 2880 -2 Branches 1245 1247 +2 ========================================== - Hits 2768 2766 -2 Misses 114 114 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

yuki0410-dev commented 1 month ago

型 '{ onChange: Mock<any, any, any>; showWeekPicker: true; }' を型 'IntrinsicAttributes & (IntrinsicClassAttributes & ((Pick<Readonly<Omit<CalendarProps, "container" | ... 18 more ... | "outsideClickIgnoreClass"> & ... 5 more ... & { ...; }>, "form" | ... 108 more ... | "onChangeRaw"> & InexactPartial<...> & InexactPartial<...>) | (Pick<...> & ... 1 more ... & InexactPar...' に割り当てることはできません。 型 '{ onChange: Mock<any, any, any>; showWeekPicker: true; }' には 型 'Pick<Readonly<Omit<CalendarProps, "container" | "onSelect" | "setOpen" | "dateFormat" | "preSelection" | "setPreSelection" | "selectsRange" | "handleOnKeyDown" | "highlightDates" | ... 10 more ... | "outsideClickIgnoreClass"> & ... 5 more ... & { ...; }>, "form" | ... 108 more ... | "onChangeRaw">' からの次のプロパティがありません: selectsMultiple, popperPropsts(2322)

yuki0410-dev commented 1 month ago

We also worked on some tests that could simply be transferred to TS

martijnrusschen commented 1 month ago

Build is failing due to a ratelimit issue on codecov. I have a fix (https://github.com/Hacker0x01/react-datepicker/pull/4816) ready which I'll merge shortly. Please rebase this PR afterwards.

martijnrusschen commented 1 month ago

Fix has been merged. Please rebase.

yuki0410-dev commented 1 month ago

@martijnrusschen Thanks for the quick response. rebased.