react-native-draggable-grid icon indicating copy to clipboard operation
react-native-draggable-grid copied to clipboard

Typescript errors

Open alexandrumic opened this issue 3 years ago • 2 comments

Hello,

I am having the following errors when I am running typecheck script:

node_modules/react-native-draggable-grid/src/draggable-grid.tsx:100:20 - error TS6133: 'item' is declared but its value is never read.

100     items.forEach((item, index) => {
                       ~~~~

node_modules/react-native-draggable-grid/src/draggable-grid.tsx:123:24 - error TS6133: 'nativeEvent' is declared but its value is never read.

123   function onStartDrag(nativeEvent: GestureResponderEvent, gestureState: PanResponderGestureState) {
                           ~~~~~~~~~~~

node_modules/react-native-draggable-grid/src/draggable-grid.tsx:144:23 - error TS6133: 'nativeEvent' is declared but its value is never read.

144   function onHandMove(nativeEvent: GestureResponderEvent, gestureState: PanResponderGestureState) {
                          ~~~~~~~~~~~


Found 3 errors.

I have a typecheck script defined as ./node_modules/.bin/tsc --noEmit. I've also tried with --skipLibCheck even if in tsconfig.js I have "skipLibCheck": true, and

"exclude": [
    "node_modules",
    ...
  ]

added.

This should ignore errors from node_modules but it seems that I am still receiving the ones from this library.

Do you have some solutions for this?

Thanks

alexandrumic avatar Nov 12 '20 08:11 alexandrumic

Update: I have managed to fix the Typescript errors in https://github.com/SHISME/react-native-draggable-grid/pull/39

alexandrumic avatar Nov 12 '20 09:11 alexandrumic

ok,thanks for pr

SHISME avatar Nov 13 '20 01:11 SHISME