react-native-paper-dates icon indicating copy to clipboard operation
react-native-paper-dates copied to clipboard

Typescript errors from this library

Open CommanderRedYT opened this issue 1 year ago • 0 comments

I know this is not that much a thing about this library, but it is the only one causing me issues with typechecking.

I have a react native app using this library. When I run tsc --project tsconfig.json --pretty --noEmit --skipLibCheck, I get errors from only this library inside the node_modules folder.

$ tsc --project tsconfig.json --pretty --noEmit --skipLibCheck
node_modules/react-native-paper-dates/src/Date/Calendar.tsx:16:19 - error TS7016: Could not find a declaration file for module 'color'. '/home/user/bla/node_modules/color/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/color` if it exists or add a new declaration (.d.ts) file containing `declare module 'color';`

16 import Color from 'color'
                     ~~~~~~~

node_modules/react-native-paper-dates/src/Date/Swiper.tsx:106:13 - error TS2812: Property 'scrollTo' does not exist on type 'HTMLDivElement'. Try changing the 'lib' compiler option to include 'dom'.

106     element.scrollTo({
                ~~~~~~~~

I tried upgrading this library and/or typescript to their newest versions, but nothing worked... Even when I install the @types/color package, the error is still here...

CommanderRedYT avatar Apr 21 '24 14:04 CommanderRedYT