@types/use-double-click
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

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.

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;

Additional Details

  • Last updated: Sun, 17 Mar 2024 21:35:48 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Matthew Peveler.

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @types/use-double-click

    Weekly Downloads

    3,659

    Version

    1.0.5

    License

    MIT

    Unpacked Size

    4.17 kB

    Total Files

    5

    Last publish

    Collaborators

    • types