Skip to content

Commit a2809c5

Browse files
(Trying to) fix(ing) typescript type dfinition
1 parent c646e42 commit a2809c5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/vuedraggable.d.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
declare module 'vuedraggable' {
2-
import Vue, { VueConstructor } from 'vue';
2+
3+
import { ComponentPublicInstance, VueConstructor } from 'vue';
34

45
type CombinedVueInstance<
5-
Instance extends Vue,
6+
Instance extends ComponentPublicInstance,
67
Data,
78
Methods,
89
Computed,
910
Props
1011
> = Data & Methods & Computed & Props & Instance;
1112

1213
type ExtendedVue<
13-
Instance extends Vue,
14+
Instance extends ComponentPublicInstance,
1415
Data,
1516
Methods,
1617
Computed,
1718
Props
1819
> = VueConstructor<
19-
CombinedVueInstance<Instance, Data, Methods, Computed, Props> & Vue
20+
CombinedVueInstance<Instance, Data, Methods, Computed, Props> & ComponentPublicInstance
2021
>;
2122

2223
export type DraggedContext<T> = {
@@ -27,7 +28,7 @@ declare module 'vuedraggable' {
2728

2829
export type DropContext<T> = {
2930
index: number;
30-
component: Vue;
31+
component: ComponentPublicInstance;
3132
element: T;
3233
};
3334

@@ -71,7 +72,7 @@ declare module 'vuedraggable' {
7172
};
7273

7374
const draggable: ExtendedVue<
74-
Vue,
75+
ComponentPublicInstance,
7576
{},
7677
{},
7778
{},

0 commit comments

Comments
 (0)