Skip to content

Commit 9078b1d

Browse files
authored
Fix setTimeout type (#3239)
* Fix setTimeout type
1 parent 4db5230 commit 9078b1d

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

packages/@react-aria/dnd/src/DragManager.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ class DragSession {
153153
currentDropItem: DroppableItem;
154154
dropOperation: DropOperation;
155155
private mutationObserver: MutationObserver;
156-
private mutationImmediate: NodeJS.Immediate;
157156
private restoreAriaHidden: () => void;
158157
private formatMessage: (key: string) => string;
159158
private isVirtualClick: boolean;
@@ -204,9 +203,6 @@ class DragSession {
204203

205204
this.mutationObserver.disconnect();
206205
this.restoreAriaHidden();
207-
if (this.mutationImmediate) {
208-
clearImmediate(this.mutationImmediate);
209-
}
210206
}
211207

212208
onKeyDown(e: KeyboardEvent) {

packages/@react-aria/dnd/src/useDroppableCollection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ interface DroppingState {
3434
collection: Collection<Node<unknown>>,
3535
focusedKey: Key,
3636
selectedKeys: Set<Key>,
37-
timeout: NodeJS.Timeout
37+
timeout: ReturnType<typeof setTimeout>
3838
}
3939

4040
const DROP_POSITIONS: DropPosition[] = ['before', 'on', 'after'];

packages/@react-aria/overlays/src/useOverlayPosition.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export function useOverlayPosition(props: AriaPositionProps): PositionAria {
140140
// This will ensure that overlays adjust their positioning when the iOS virtual keyboard appears.
141141
let isResizing = useRef(false);
142142
useLayoutEffect(() => {
143-
let timeout: NodeJS.Timeout;
143+
let timeout: ReturnType<typeof setTimeout>;
144144
let onResize = () => {
145145
isResizing.current = true;
146146
clearTimeout(timeout);

0 commit comments

Comments
 (0)