
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@types/draggabilly
Advanced tools
TypeScript definitions for draggabilly
npm install --save @types/draggabilly
This package contains type definitions for draggabilly (https://draggabilly.desandro.com).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/draggabilly.
declare namespace Draggabilly {
interface Position {
x: number;
y: number;
}
interface DraggabillyOptions {
/** Constrains movement to horizontal or vertical axis. */
axis?: "x" | "y" | undefined;
/** Contains movement to the bounds of the element. If true, the container will be the parent element. */
containment?: Element | string | boolean | undefined;
/** Snaps the element to a grid, every `x` and `y` pixels. */
grid?: [number, number] | undefined;
/**
* Specifies on what element the drag interaction starts.
*
* `handle` is useful for when you do not want all inner elements to be used for dragging, like inputs and forms.
* See [back handle example on CodePen](https://codepen.io/desandro/pen/znAuH).
*/
handle?: string | HTMLElement | ReadonlyArray<HTMLElement> | NodeList | undefined;
}
type DraggabillyClickEventName = "dragStart" | "dragEnd" | "pointerDown" | "pointerUp" | "staticClick";
type DraggabillyMoveEventName = "dragMove" | "pointerMove";
interface DraggabillyEventCallback {
(
eventName: Draggabilly.DraggabillyClickEventName,
listener: (
/** The original event */
event: Event,
/** The event object that has `.pageX` and `.pageY` */
pointer: MouseEvent | Touch,
) => void,
): Draggabilly;
(
eventName: Draggabilly.DraggabillyMoveEventName,
listener: (
/** The original event */
event: Event,
/** The event object that has `.pageX` and `.pageY` */
pointer: MouseEvent | Touch,
/** How far the pointer has moved from its start position */
moveVector: Draggabilly.Position,
) => void,
): Draggabilly;
}
}
declare class Draggabilly {
position: Draggabilly.Position;
constructor(element: Element | string, options?: Draggabilly.DraggabillyOptions);
on: Draggabilly.DraggabillyEventCallback;
off: Draggabilly.DraggabillyEventCallback;
once: Draggabilly.DraggabillyEventCallback;
disable(): void;
enable(): void;
setPosition(x: number, y: number): void;
dragEnd(): void;
destroy(): void;
}
export = Draggabilly;
These definitions were written by Jason Wu.
FAQs
TypeScript definitions for draggabilly
The npm package @types/draggabilly receives a total of 3,993 weekly downloads. As such, @types/draggabilly popularity was classified as popular.
We found that @types/draggabilly demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.