forked from microsoft/TypeScriptSamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjqueryui.d.ts
More file actions
92 lines (84 loc) · 2.41 KB
/
jqueryui.d.ts
File metadata and controls
92 lines (84 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/// <reference path="jquery.d.ts"/>
// Partial typing for the jQueryUI library, version 1.8.x
interface DraggableEventUIParam {
helper: JQuery;
position: { top: number; left: number;};
offset: { top: number; left: number;};
}
interface DraggableEvent {
(event: Event, ui: DraggableEventUIParam): void;
}
interface Draggable {
// Options
disabled?: boolean;
addClasses?: boolean;
appendTo?: any;
axis?: string;
cancel?: string;
connectToSortable?: string;
containment?: any;
cursor?: string;
cursorAt?: any;
delay?: number;
distance?: number;
grid?: number[];
handle?: any;
helper?: any;
iframeFix?: any;
opacity?: number;
refreshPositions?: boolean;
revert?: any;
revertDuration?: number;
scope?: string;
scroll?: boolean;
scrollSensitivity?: number;
scrollSpeed?: number;
snap?: any;
snapMode?: string;
snapTolerance?: number;
stack?: string;
zIndex?: number;
// Events
create?: DraggableEvent;
start?: DraggableEvent;
drag?: DraggableEvent;
stop?: DraggableEvent;
}
interface DroppableEventUIParam {
draggable: JQuery;
helper: JQuery;
position: { top: number; left: number;};
offset: { top: number; left: number;};
}
interface DroppableEvent {
(event: Event, ui: DroppableEventUIParam): void;
}
interface Droppable {
// Options
disabled?: boolean;
accept?: any;
activeClass?: string;
greedy?: boolean;
hoverClass?: string;
scope?: string;
tolerance?: string;
// Events
create?: DroppableEvent;
activate?: DroppableEvent;
deactivate?: DroppableEvent;
over?: DroppableEvent;
out?: DroppableEvent;
drop?: DroppableEvent;
}
interface JQuery {
draggable(options: Draggable): JQuery;
draggable(optionLiteral: string, options: Draggable): JQuery;
draggable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
draggable(optionLiteral: string, optionName: string): any;
// draggable(methodName: string): any;
droppable(options: Droppable): JQuery;
droppable(optionLiteral: string, options: Draggable): JQuery;
droppable(optionLiteral: string, optionName: string, optionValue: any): JQuery;
droppable(optionLiteral: string, optionName: string): any;
droppable(methodName: string): any;
}