Enable React Native strict TypeScript API (#11459)

This commit is contained in:
Samuel Newman
2026-08-25 09:40:14 +03:00
committed by GitHub
parent 5f3d24efab
commit f87fdd2ea2
149 changed files with 506 additions and 623 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
import {useCallback, useMemo, useRef, useState} from 'react'
import {View, type ViewabilityConfig} from 'react-native'
import {View} from 'react-native'
import {Trans, useLingui} from '@lingui/react/macro'
import {type ViewabilityConfig} from '@react-native/virtualized-lists'
import {useQueryClient} from '@tanstack/react-query'
import * as bcp47Match from 'bcp-47-match'
+1 -1
View File
@@ -115,7 +115,7 @@ export function SearchScreenShell({
const {gtMobile} = useBreakpoints()
const navigation = useNavigation<NavigationProp>()
const route = useRoute()
const textInput = useRef<TextInput>(null)
const textInput = useRef<React.ComponentRef<typeof TextInput>>(null)
const {t: l} = useLingui()
const {currentAccount} = useSession()
const queryClient = useQueryClient()
@@ -28,7 +28,7 @@ export function ClearableInput({
}) {
const t = useTheme()
const {t: l} = useLingui()
const inputRef = useRef<TextInput>(null)
const inputRef = useRef<React.ComponentRef<typeof TextInput>>(null)
const [showClear, setShowClear] = useState(defaultValue.length > 0)
return (
@@ -137,8 +137,8 @@ function DialogInner({
const [dateUntilActive, setDateUntilActive] = useState(!!parsed.until)
const [filters, setFilters] = useState<AdvancedFilter[]>(parsed.filters)
const scrollRef = useRef<ScrollView>(null)
const filtersSectionRef = useRef<View>(null)
const scrollRef = useRef<React.ComponentRef<typeof ScrollView>>(null)
const filtersSectionRef = useRef<React.ComponentRef<typeof View>>(null)
function addFilter() {
if (filters.length >= MAX_FILTERS) return
@@ -37,7 +37,7 @@ export function SearchAutocompleteInput({
* keystroke while the input is still focused.
*/
const [dismissed, setDismissed] = useState(false)
const inputRef = useRef<TextInput>(null)
const inputRef = useRef<React.ComponentRef<typeof TextInput>>(null)
const sift = useSift({
offset: a.p_sm.padding,