-
Notifications
You must be signed in to change notification settings - Fork 471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$page type not defined #1382
Comments
I’m getting the same too with code like this: <Link
v-bind:class="{ 'active': $page.component === 'Dashboard' }"
v-bind:href="dashboardUrl"
>Dashboard</Link> The error I get in Visual Studio Code is:
|
I think the issue might be that |
As a temp fix you can declare your own types like this: import type { Page } from '@inertiajs/core'
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$page: Page
}
} |
You can also just import types.ts into your own .d.ts file as another temporary fix: import Types from "@inertiajs/vue3/types/types" |
The last release (1.0.0) does not include that fix. Is it going to be included in a future patch? |
@reinink Hey, any news on what version this fix will be included in and a ETA on release? |
Version:
@inertiajs/vue3
version: 1.0.0Describe the problem:
$page
type forComponentCustomProperties
is not defined in the typings for@inertiajs/vue3
The text was updated successfully, but these errors were encountered: