Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/dragula

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/dragula

TypeScript definitions for dragula

  • 3.7.4
  • ts4.5
  • ts4.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
75K
decreased by-18.38%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/dragula

Summary

This package contains type definitions for dragula (http://bevacqua.github.io/dragula/).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dragula.

index.d.ts

declare const dragula: dragula.Dragula;

export = dragula;
export as namespace dragula;

declare namespace dragula {
    interface DragulaOptions {
        containers?: Element[] | undefined;
        isContainer?: ((el?: Element) => boolean) | undefined;
        moves?: ((el?: Element, container?: Element, handle?: Element, sibling?: Element) => boolean) | undefined;
        accepts?: ((el?: Element, target?: Element, source?: Element, sibling?: Element) => boolean) | undefined;
        invalid?: ((el?: Element, target?: Element) => boolean) | undefined;
        direction?: string | undefined;
        copy?: ((el: Element, source: Element) => boolean) | boolean | undefined;
        copySortSource?: boolean | undefined;
        revertOnSpill?: boolean | undefined;
        removeOnSpill?: boolean | undefined;
        delay?: boolean | number | undefined;
        mirrorContainer?: Element | undefined;
        ignoreInputTextSelection?: boolean | undefined;
    }

    interface Drake {
        containers: Element[];
        dragging: boolean;
        start(item: Element): void;
        end(): void;
        cancel(revert?: boolean): void;
        canMove(item: Element): boolean;
        remove(): void;
        on(event: "drag", listener: (el: Element, source: Element) => void): Drake;
        on(event: "dragend", listener: (el: Element) => void): Drake;
        on(event: "drop", listener: (el: Element, target: Element, source: Element, sibling: Element) => void): Drake;
        on(
            event: "cancel" | "remove" | "shadow" | "over" | "out",
            listener: (el: Element, container: Element, source: Element) => void,
        ): Drake;
        on(event: "cloned", listener: (clone: Element, original: Element, type: "mirror" | "copy") => void): Drake;
        destroy(): void;
    }

    interface Dragula {
        (containers: Element, options: DragulaOptions): Drake;
        (containers: Element[], options?: DragulaOptions): Drake;
        (options?: DragulaOptions): Drake;
    }
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 20:08:00 GMT
  • Dependencies: none

Credits

These definitions were written by Paul Welter, Yang He, and Piotr Błażejewicz.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc