Enable React Native strict TypeScript API (#11459)
This commit is contained in:
@@ -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'
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user