gpbl / react-day-picker

DayPicker is a customizable date picker component for React. Add date pickers, calendars, and date inputs to your web applications.
https://daypicker.dev
MIT License
6.09k stars 732 forks source link

TypeScript unable to find declaration file #2563

Closed jgosmann closed 2 weeks ago

jgosmann commented 2 weeks ago

Starting with version 9.2 of react-day-picker, the TypeScript compiler complains with:

node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.d.ts:12:17 - error TS7016: Could not find a declaration file for module 'date-fns/locale/types.js'. '/Users/redacted/project-root/node_modules/date-fns/locale/types.js' implicitly has an 'any' type.

12 locale?: import("date-fns/locale/types.js").Locale): string;
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 1 error in node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.d.ts:12

Expected Behavior

No errors from the TypeScript compiler.

Actual Behavior

Above error from the TypeScript compiler.

gpbl commented 2 weeks ago

@jgosmann please how can I reproduce it? 🙏