Skip to content

Commit

Permalink
Restore Vue 3 usePage generic type
Browse files Browse the repository at this point in the history
  • Loading branch information
jessarcher committed Jan 18, 2023
1 parent 0dd3c0f commit 25c56b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vue3/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface InertiaAppProps {
export type InertiaApp = DefineComponent<InertiaAppProps>

const component = ref(null)
const page = ref<Partial<Page>>({})
const page = ref<Page>(null)
const layout = shallowRef(null)
const key = ref(null)
let headManager = null
Expand Down Expand Up @@ -115,6 +115,6 @@ export const plugin: Plugin = {
},
}

export function usePage() {
export function usePage<T>(): Page<T> {
return page.value
}

0 comments on commit 25c56b7

Please sign in to comment.