|
1 | 1 | import { useEffect, useMemo, useRef } from 'react' |
2 | | -import type { MutableRefObject } from 'react' |
| 2 | +import type { RefObject } from 'react' |
3 | 3 | import { autoUpdate } from '@floating-ui/dom' |
4 | 4 | import { |
5 | 5 | debounce, |
@@ -57,16 +57,16 @@ const useTooltipEvents = ({ |
57 | 57 | handleShow: (value: boolean) => void |
58 | 58 | handleShowTooltipDelayed: (delay?: number) => void |
59 | 59 | handleTooltipPosition: ({ x, y }: IPosition) => void |
60 | | - hoveringTooltip: MutableRefObject<boolean> |
| 60 | + hoveringTooltip: RefObject<boolean> |
61 | 61 | imperativeModeOnly?: boolean |
62 | | - lastFloatPosition: MutableRefObject<IPosition | null> |
| 62 | + lastFloatPosition: RefObject<IPosition | null> |
63 | 63 | openEvents?: AnchorOpenEvents |
64 | 64 | openOnClick: boolean |
65 | 65 | setActiveAnchor: (anchor: HTMLElement | null) => void |
66 | 66 | show: boolean |
67 | | - tooltipHideDelayTimerRef: MutableRefObject<NodeJS.Timeout | null> |
68 | | - tooltipRef: MutableRefObject<HTMLElement | null> |
69 | | - tooltipShowDelayTimerRef: MutableRefObject<NodeJS.Timeout | null> |
| 67 | + tooltipHideDelayTimerRef: RefObject<NodeJS.Timeout | null> |
| 68 | + tooltipRef: RefObject<HTMLElement | null> |
| 69 | + tooltipShowDelayTimerRef: RefObject<NodeJS.Timeout | null> |
70 | 70 | updateTooltipPosition: () => void |
71 | 71 | }) => { |
72 | 72 | // Ref-stable debounced handlers — avoids recreating debounce instances on every effect run |
|
0 commit comments