diff --git a/src/components/bottomSheetBackdrop/BottomSheetBackdrop.tsx b/src/components/bottomSheetBackdrop/BottomSheetBackdrop.tsx index 6753e8037..29ea3f10f 100644 --- a/src/components/bottomSheetBackdrop/BottomSheetBackdrop.tsx +++ b/src/components/bottomSheetBackdrop/BottomSheetBackdrop.tsx @@ -6,7 +6,7 @@ import React, { useRef, useState, } from 'react'; -import { ViewProps } from 'react-native'; +import type { ViewProps } from 'react-native'; import Animated, { interpolate, Extrapolate, @@ -160,6 +160,7 @@ const BottomSheetBackdropComponent = ({ ); return pressBehavior !== 'none' ? ( + // @ts-ignore {AnimatedView} diff --git a/src/components/bottomSheetFooter/BottomSheetFooter.tsx b/src/components/bottomSheetFooter/BottomSheetFooter.tsx index fff8d6448..e18358f31 100644 --- a/src/components/bottomSheetFooter/BottomSheetFooter.tsx +++ b/src/components/bottomSheetFooter/BottomSheetFooter.tsx @@ -1,5 +1,5 @@ import React, { memo, useCallback, useMemo } from 'react'; -import { LayoutChangeEvent } from 'react-native'; +import type { LayoutChangeEvent } from 'react-native'; import Animated, { useAnimatedStyle } from 'react-native-reanimated'; import { KEYBOARD_STATE } from '../../constants'; import { useBottomSheetInternal } from '../../hooks'; diff --git a/src/components/bottomSheetModal/BottomSheetModal.tsx b/src/components/bottomSheetModal/BottomSheetModal.tsx index 0e8144d68..ab22189bf 100644 --- a/src/components/bottomSheetModal/BottomSheetModal.tsx +++ b/src/components/bottomSheetModal/BottomSheetModal.tsx @@ -143,14 +143,14 @@ const BottomSheetModalComponent = forwardRef< } bottomSheetRef.current?.snapToPosition(...args); }, []); - const handleExpand = useCallback((...args) => { + const handleExpand = useCallback((...args: any[]) => { if (minimized.current) { return; } bottomSheetRef.current?.expand(...args); }, []); const handleCollapse = useCallback( - (...args) => { + (...args: any[]) => { if (minimized.current) { return; } @@ -158,14 +158,14 @@ const BottomSheetModalComponent = forwardRef< }, [] ); - const handleClose = useCallback((...args) => { + const handleClose = useCallback((...args: any[]) => { if (minimized.current) { return; } bottomSheetRef.current?.close(...args); }, []); const handleForceClose = useCallback( - (...args) => { + (...args: any[]) => { if (minimized.current) { return; } diff --git a/src/components/bottomSheetTextInput/BottomSheetTextInput.tsx b/src/components/bottomSheetTextInput/BottomSheetTextInput.tsx index d5c8727e0..59513760e 100644 --- a/src/components/bottomSheetTextInput/BottomSheetTextInput.tsx +++ b/src/components/bottomSheetTextInput/BottomSheetTextInput.tsx @@ -20,7 +20,7 @@ const BottomSheetTextInputComponent = forwardRef< //#region callbacks const handleOnFocus = useCallback( - args => { + (args: any) => { shouldHandleKeyboardEvents.value = true; if (onFocus) { onFocus(args); @@ -29,7 +29,7 @@ const BottomSheetTextInputComponent = forwardRef< [onFocus, shouldHandleKeyboardEvents] ); const handleOnBlur = useCallback( - args => { + (args: any) => { shouldHandleKeyboardEvents.value = false; if (onBlur) { onBlur(args); diff --git a/src/hooks/useScrollableSetter.ts b/src/hooks/useScrollableSetter.ts index ea7d3c24e..cc6726b5d 100644 --- a/src/hooks/useScrollableSetter.ts +++ b/src/hooks/useScrollableSetter.ts @@ -1,8 +1,8 @@ import React, { useCallback, useEffect } from 'react'; -import Animated from 'react-native-reanimated'; +import type Animated from 'react-native-reanimated'; import { useBottomSheetInternal } from './useBottomSheetInternal'; import { getRefNativeTag } from '../utilities/getRefNativeTag'; -import { SCROLLABLE_TYPE } from '../constants'; +import type { SCROLLABLE_TYPE } from '../constants'; import type { Scrollable } from '../types'; export const useScrollableSetter = ( diff --git a/tsconfig.json b/tsconfig.json index 310b40ba9..ca79c2c59 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -21,7 +21,8 @@ "resolveJsonModule": true, "skipLibCheck": true, "strict": true, - "target": "esnext" + "target": "esnext", + "importsNotUsedAsValues": "error" }, "exclude": ["example"], "include": ["src"]