npm install --save @types/use-double-click
This package contains type definitions for use-double-click (https://github.com/tim-soft/use-double-click).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/use-double-click.
import { MouseEvent, RefObject } from "react";
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics -- Backwards compatibility. Can be removed in a Major release.
declare function useDoubleClick<T = unknown>(options: {
/** Dom node to watch for double clicks */
ref: RefObject<T | null>;
/** The amount of time (in milliseconds) to wait before differentiating a single from a double click. Defaults to 300. */
latency?: number | undefined;
/** A callback function for single click events */
onSingleClick?: ((e: MouseEvent) => void) | undefined;
/** A callback function for double click events */
onDoubleClick?: ((e: MouseEvent) => void) | undefined;
}): void;
export = useDoubleClick;
- Last updated: Sun, 17 Mar 2024 21:35:48 GMT
- Dependencies: @types/react
These definitions were written by Matthew Peveler.