TS Support gone for usePage hook? #1380
Unanswered
amiranagram
asked this question in
Help (Vue)
Replies: 1 comment
-
It looks like it's in the work 25c56b7 EDIT: Following @lepikhinb suggestion on the Discord channel, you can declare the import "@inertiajs/vue3"
import { Page } from "@inertiajs/core"
declare module "@inertiajs/vue3" {
export declare function usePage(): Page<{Your.Type}>
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! Before the latest (1.0.0) release I was able to type-hint the
usePage
hook, like this:I was hoping that after ditching the computed props in
usePage
I would be able to do this:but not anymore.
NOTE that
SharedData
is my own type that I wrote for everything I'm passing from the inertia middleware.Beta Was this translation helpful? Give feedback.
All reactions