1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-13 10:44:02 +02:00

Fix useTimeout type to use browser type instead of nodejs type (#4419)

This commit is contained in:
Bryan Haakman
2021-08-07 00:30:48 +02:00
committed by GitHub
parent 0765766db3
commit 1f3a489afd

View File

@@ -17,7 +17,7 @@ export function useAndroidInputManager(node: RefObject<HTMLElement>) {
const editor = useSlateStatic()
const [inputManager] = useState(() => new AndroidInputManager(editor))
const { receivedUserInput, onUserInput } = useTrackUserInput()
const timeoutId = useRef<NodeJS.Timeout | null>(null)
const timeoutId = useRef<ReturnType<typeof setTimeout> | null>(null)
const isReconciling = useRef(false)
const flush = useCallback((mutations: MutationRecord[]) => {
if (!receivedUserInput.current) {