mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Wrote it as an external module
This commit is contained in:
Vendored
+21
-29
@@ -4,43 +4,35 @@
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
// export = Backbone;
|
||||
// export as namespace Backbone;
|
||||
export interface Position {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
|
||||
declare module 'draggabilly' {
|
||||
interface Position {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
export interface DraggabillyOptions {
|
||||
axis?: 'x' | 'y';
|
||||
containment?: Element | string | boolean;
|
||||
grid?: [number, number];
|
||||
handle?: string;
|
||||
}
|
||||
|
||||
export interface DraggabillyOptions {
|
||||
axis?: 'x' | 'y';
|
||||
containment?: Element | string | boolean;
|
||||
grid?: [number, number];
|
||||
handle?: string;
|
||||
}
|
||||
export type DraggabillyEventName = 'dragStart' | 'dragMove' | 'dragEnd' | 'pointerDown' | 'pointerMove' | 'pointerUp'
|
||||
| 'staticClick';
|
||||
|
||||
export type DraggabillyEventName = 'dragStart' | 'dragMove' | 'dragEnd' | 'pointerDown' | 'pointerMove' | 'pointerUp'
|
||||
| 'staticClick';
|
||||
export default class Draggabilly {
|
||||
position: Position;
|
||||
|
||||
export default class Draggabilly {
|
||||
position: Position;
|
||||
constructor(element: Element | string, options?: DraggabillyOptions);
|
||||
|
||||
constructor(element: Element | string, options?: DraggabillyOptions);
|
||||
on(eventName: DraggabillyEventName, listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): Draggabilly;
|
||||
|
||||
on(eventName: DraggabillyEventName,
|
||||
listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): void;
|
||||
off(eventName: DraggabillyEventName, listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): Draggabilly;
|
||||
|
||||
off(eventName: DraggabillyEventName,
|
||||
listener: (event: Event, pointer: MouseEvent | Touch, moveVector: Position) => void): void;
|
||||
once(eventName: DraggabillyEventName, listener: (event: Event, pointer: MouseEvent | Touch, moveVector?: Position) => void): Draggabilly;
|
||||
|
||||
once(eventName: DraggabillyEventName,
|
||||
listener: (event: Event, pointer: MouseEvent | Touch, moveVector?: Position) => void): void;
|
||||
enable(): void;
|
||||
|
||||
enable(): void;
|
||||
disable(): void;
|
||||
|
||||
disable(): void;
|
||||
|
||||
destroy(): void;
|
||||
}
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": false,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
|
||||
Reference in New Issue
Block a user