-
Notifications
You must be signed in to change notification settings - Fork 2.9k
/
Copy pathvuedraggable.d.ts
75 lines (67 loc) · 1.36 KB
/
vuedraggable.d.ts
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
declare module 'vuedraggable' {
import Vue, { VueConstructor } from 'vue';
type CombinedVueInstance<
Instance extends Vue,
Data,
Methods,
Computed,
Props
> = Data & Methods & Computed & Props & Instance;
type ExtendedVue<
Instance extends Vue,
Data,
Methods,
Computed,
Props
> = VueConstructor<
CombinedVueInstance<Instance, Data, Methods, Computed, Props> & Vue
>;
export type DraggedContext<T> = {
index: number;
futureIndex: number;
element: T;
};
export type DropContext<T> = {
index: number;
component: Vue;
element: T;
};
export type Rectangle = {
top: number;
right: number;
bottom: number;
left: number;
width: number;
height: number;
};
export type MoveEvent<T> = {
originalEvent: DragEvent;
dragged: Element;
draggedContext: DraggedContext<T>;
draggedRect: Rectangle;
related: Element;
relatedContext: DropContext<T>;
relatedRect: Rectangle;
from: Element;
to: Element;
willInsertAfter: boolean;
isTrusted: boolean;
};
const draggable: ExtendedVue<
Vue,
{},
{},
{},
{
options: any;
list: any[];
value: any[];
noTransitionOnDrag?: boolean;
clone: any;
tag?: string | null;
move: any;
componentData: any;
}
>;
export default draggable;
}