upgrade @types/react to 19 + run codemod

This commit is contained in:
Samuel Newman
2025-05-16 16:22:41 -07:00
parent c6fc298d1e
commit bb733dc085
52 changed files with 177 additions and 146 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import * as React from 'react'
import {Animated} from 'react-native'
export function useAnimatedValue(initialValue: number) {
const lazyRef = React.useRef<Animated.Value>()
const lazyRef = React.useRef<Animated.Value>(undefined)
if (lazyRef.current === undefined) {
lazyRef.current = new Animated.Value(initialValue)
+2 -2
View File
@@ -1,5 +1,5 @@
import React from 'react'
import {Alert, AppState, AppStateStatus} from 'react-native'
import {Alert, AppState, type AppStateStatus} from 'react-native'
import {nativeBuildVersion} from 'expo-application'
import {
checkForUpdateAsync,
@@ -35,7 +35,7 @@ export function useOTAUpdates() {
const appState = React.useRef<AppStateStatus>('active')
const lastMinimize = React.useRef(0)
const ranInitialCheck = React.useRef(false)
const timeout = React.useRef<NodeJS.Timeout>()
const timeout = React.useRef<NodeJS.Timeout>(undefined)
const {isUpdatePending} = useUpdates()
const setCheckTimeout = React.useCallback(() => {
+1 -1
View File
@@ -13,7 +13,7 @@
* returns a ref callback function that can be used to merge multiple refs into a single ref.
*/
export function mergeRefs<T = any>(
refs: Array<React.MutableRefObject<T> | React.LegacyRef<T>>,
refs: Array<React.MutableRefObject<T> | React.Ref<T>>,
): React.RefCallback<T> {
return value => {
refs.forEach(ref => {