Remove dependency resolution override for React 19 types (#39569)

Co-authored-by: ChaosExAnima <ChaosExAnima@users.noreply.github.com>
This commit is contained in:
diondiondionandChaosExAnima authored and GitHub committed 2026-06-25 07:54:30 +00:00
1 parent f440615b01
commit f2e10fd5db
52 files changed
+112 -110

No files matched your search

+4 -4
View File
@@ -1,8 +1,8 @@
import { useRef, useCallback, useEffect } from 'react';
export const useTimeout = () => {
const timeoutRef = useRef<ReturnType<typeof setTimeout>>();
const callbackRef = useRef<() => void>();
const timeoutRef = useRef<ReturnType<typeof setTimeout>>(null);
const callbackRef = useRef<() => void>(null);
const set = useCallback((callback: () => void, delay: number) => {
if (timeoutRef.current) {
@@ -28,8 +28,8 @@ export const useTimeout = () => {
const cancel = useCallback(() => {
if (timeoutRef.current) {
clearTimeout(timeoutRef.current);
timeoutRef.current = undefined;
callbackRef.current = undefined;
timeoutRef.current = null;
callbackRef.current = null;
}
}, []);