diff --git a/renderer/app.ts b/renderer/app.ts index 6a8d2dc..7730d93 100644 --- a/renderer/app.ts +++ b/renderer/app.ts @@ -1,5 +1,5 @@ import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' -import { createSSRApp, defineComponent, h, markRaw, reactive } from 'vue' +import { createSSRApp, defineComponent, h, markRaw, reactive, Component } from 'vue' import PageShell from '#components/PageShell.vue' import { setPageContext } from '#context/usePageContext' @@ -7,13 +7,13 @@ import i18n from '#plugins/i18n' import pinia from '#plugins/pinia' import CreateVuetify from '#plugins/vuetify' -import type { Component } from '#types/Component' import type { PageContext, VikePageContext } from '#types/PageContext' const vuetify = CreateVuetify(i18n) function createApp(pageContext: VikePageContext & PageContext, isClient = true) { - let rootComponent: Component + // eslint-disable-next-line no-use-before-define + let rootComponent: InstanceType const PageWithWrapper = defineComponent({ data: () => ({ Page: markRaw(pageContext.Page), @@ -26,7 +26,7 @@ function createApp(pageContext: VikePageContext & PageContext, isClient = true) }, render() { return h( - PageShell, + PageShell as Component, {}, { default: () => { @@ -49,9 +49,7 @@ function createApp(pageContext: VikePageContext & PageContext, isClient = true) objectAssign(app, { changePage: (pageContext: VikePageContext & PageContext) => { Object.assign(pageContextReactive, pageContext) - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access rootComponent.Page = markRaw(pageContext.Page) - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access rootComponent.pageProps = markRaw(pageContext.pageProps || {}) }, }) diff --git a/types/Component.ts b/types/Component.ts deleted file mode 100644 index b996d61..0000000 --- a/types/Component.ts +++ /dev/null @@ -1,2 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/no-explicit-any -export type Component = any