Skip to content

Commit 88b7328

Browse files
authored
Update Vue and Inertia types
1 parent 66fc811 commit 88b7328

2 files changed

Lines changed: 51 additions & 24 deletions

File tree

module.d.ts

Lines changed: 47 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// module.d.ts
2-
2+
export {}
33
declare module "adminui" {
44
import * as Vue from "vue";
55

@@ -14,28 +14,53 @@ declare module "adminui" {
1414
reload: Array<string>;
1515
}
1616

17-
export function ref<T extends Vue.Ref>(value: T): T;
18-
export function ref<T>(value: T): Vue.Ref<Vue.UnwrapRef<T>>;
19-
export function ref<T = any>(): Vue.Ref<T | undefined>;
20-
21-
export const watch: (
22-
expOrFn: string | (() => any),
23-
cb: Function,
24-
options?: Record<string, any>
25-
) => Function;
26-
27-
export function reactive<T extends object>(
28-
target: T
29-
): Vue.UnwrapNestedRefs<T>;
17+
const ref: typeof import("vue")["ref"]
18+
const computed: typeof import("vue")["computed"]
19+
const reactive: typeof import("vue")["reactive"]
20+
const inject: typeof import("vue")["inject"]
21+
const provide: typeof import("vue")["provide"]
22+
const getCurrentInstance: typeof import("vue")["getCurrentInstance"]
23+
const watch: typeof import("vue")["watch"]
24+
const watchEffect: typeof import("vue")["watchEffect"]
25+
const nextTick: typeof import("vue")["nextTick"]
26+
const onBeforeMount: typeof import("vue")["onBeforeMount"]
27+
const onMounted: typeof import("vue")["onMounted"]
28+
const onBeforeUnmount: typeof import("vue")["onBeforeUnmount"]
29+
const onUnmounted: typeof import("vue")["onUnmounted"]
30+
const onUpdated: typeof import("vue")["onUpdated"]
31+
const onActivated: typeof import("vue")["onActivated"]
32+
const onDeactivated: typeof import("vue")["onDeactivated"]
33+
const onErrorCaptured: typeof import("vue")["onErrorCaptured"]
34+
const readonly: typeof import("vue")["readonly"]
35+
const toRaw: typeof import("vue")["toRaw"]
36+
const markRaw: typeof import("vue")["markRaw"]
37+
const isRef: typeof import("vue")["isRef"]
38+
const isProxy: typeof import("vue")["isProxy"]
39+
const unref: typeof import("vue")["unref"]
40+
const toRef: typeof import("vue")["toRef"]
41+
const toRefs: typeof import("vue")["toRefs"]
42+
const isReactive: typeof import("vue")["isReactive"]
43+
const isReadonly: typeof import("vue")["isReadonly"]
44+
const shallowRef: typeof import("vue")["shallowRef"]
45+
const h: typeof import("vue")["h"]
46+
const useTemplateRef: typeof import("vue")["useTemplateRef"]
47+
const useId: typeof import("vue")["useId"]
48+
const toValue: typeof import("vue")["toValue"]
49+
const useSlots: typeof import("vue")["useSlots"]
50+
const useAttrs: typeof import("vue")["useAttrs"]
51+
const defineAsyncComponent: typeof import("vue")["defineAsyncComponent"]
52+
const useModel: typeof import("vue")["useModel"]
53+
const hydrateOnIdle: typeof import("vue")["hydrateOnIdle"]
54+
const hydrateOnVisible: typeof import("vue")["hydrateOnVisible"]
55+
const hydrateOnMediaQuery: typeof import("vue")["hydrateOnMediaQuery"]
56+
const hydrateOnInteraction: typeof import("vue")["hydrateOnInteraction"]
3057

31-
export function computed<T>(
32-
getter: Vue.ComputedGetter<T>,
33-
debugOptions?: Vue.DebuggerOptions
34-
): Vue.ComputedRef<T>;
35-
export function computed<T>(
36-
options: Vue.WritableComputedOptions<T>,
37-
debugOptions?: Vue.DebuggerOptions
38-
): Vue.WritableComputedRef<T>;
58+
const usePage: import("@inertiajs/vue3")["usePage"]
59+
const useForm: import("@inertiajs/vue3")["useForm"]
60+
const router: import("@inertiajs/vue3")["router"]
61+
const useRoute: import("@inertiajs/vue3")["useRoute"]
62+
const Link: import("@inertiajs/vue3")["Link"]
63+
const Head: import("@inertiajs/vue3")["Head"]
3964

4065
interface ApiForm {
4166
form: object;

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
{
22
"name": "vite-plugin-adminui",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "Helper plugin for AdminUI-based sites that want to extend its functionality",
55
"type": "module",
66
"main": "./dist/index.cjs",
77
"module": "./dist/index.js",
88
"types": "module.d.ts",
99
"exports": {
1010
".": {
11+
"types": "./module.d.ts",
1112
"require": "./dist/index.cjs",
1213
"import": "./dist/index.js"
1314
}
1415
},
1516
"peerDependencies": {
1617
"vite": "^3 || ^4 || ^5 || ^6 || ^7",
17-
"vue": "^2.7.0 || >=3.0.0"
18+
"vue": "^2.7.0 || >=3.0.0",
19+
"@inertiajs/vue3": "^2.0.0"
1820
},
1921
"files": [
2022
"dist",

0 commit comments

Comments
 (0)