1.0.5 • Published 2 months ago
@types/use-double-click v1.0.5
Installation
npm install --save @types/use-double-click
Summary
This package contains type definitions for use-double-click (https://github.com/tim-soft/use-double-click).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/use-double-click.
index.d.ts
// Type definitions for use-double-click 1.0
// Project: https://github.com/tim-soft/use-double-click
// Definitions by: Matthew Peveler <https://github.com/MasterOdin>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { RefObject, MutableRefObject, MouseEvent } from 'react';
declare function useDoubleClick<T = unknown>(options: {
/** Dom node to watch for double clicks */
ref: RefObject<T> | MutableRefObject<T>;
/** 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;
Additional Details
- Last updated: Fri, 02 Jul 2021 18:04:52 GMT
- Dependencies: @types/react
- Global values: none
Credits
These definitions were written by Matthew Peveler.