enable react native strict types

This commit is contained in:
Samuel Newman
2026-08-13 11:42:09 +03:00
parent 6b35d3de1c
commit 8677387c23
104 changed files with 457 additions and 506 deletions
+7 -7
View File
@@ -1,18 +1,18 @@
import {type ForwardedRef, useEffect, useMemo, useRef} from 'react'
import {type ScrollView} from 'react-native'
import {Platform} from 'react-native'
import {Platform, type ScrollView} from 'react-native'
import {mergeRefs} from '#/lib/merge-refs'
type Props<Scrollable extends ScrollView = ScrollView> = {
type ScrollViewInstance = React.ComponentRef<typeof ScrollView>
type Props<Scrollable extends ScrollViewInstance = ScrollViewInstance> = {
cursor?: string
outerRef?: ForwardedRef<Scrollable>
}
export function useDraggableScroll<Scrollable extends ScrollView = ScrollView>({
outerRef,
cursor = 'grab',
}: Props<Scrollable> = {}) {
export function useDraggableScroll<
Scrollable extends ScrollViewInstance = ScrollViewInstance,
>({outerRef, cursor = 'grab'}: Props<Scrollable> = {}) {
const ref = useRef<Scrollable>(null)
useEffect(() => {