commenthol / date-holidays

worldwide holidays
https://commenthol.github.io/date-holidays/
Other
911 stars 236 forks source link

Add types to exports #345

Closed willbamford closed 2 years ago

willbamford commented 2 years ago

I was receiving the following after upgrading to TS 4.7 and setting "moduleResolution": "Node16" in tsconfig.json:

error TS7016: Could not find a declaration file for module 'date-holidays'. '/.../node_modules/date-holidays/lib/index.cjs' implicitly has an 'any' type. Try npm i --save-dev @types/date-holidays if it exists or add a new declaration (.d.ts) file containing declare module 'date-holidays';

Adding types to the exports field seems to fix this.