From 5acb3debea260f23627825661e40a9cafff8d4df Mon Sep 17 00:00:00 2001 From: kaivanwong Date: Thu, 18 Jan 2024 17:04:06 +0800 Subject: [PATCH] feat(types): support types for page and layout plugins --- tsconfig.json | 3 ++- types/components.d.ts | 1 - types/env.d.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 7fd1ee8..9fca928 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,7 +19,8 @@ "vite/client", "vitest", "cypress", - "@intlify/unplugin-vue-i18n/messages" + "@intlify/unplugin-vue-i18n/messages", + "vite-plugin-vue-layouts/client" ], "allowJs": true, "strict": true, diff --git a/types/components.d.ts b/types/components.d.ts index 64b0128..1e82301 100644 --- a/types/components.d.ts +++ b/types/components.d.ts @@ -10,6 +10,5 @@ declare module 'vue' { RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] TheButton: typeof import('./../src/components/TheButton.vue')['default'] - TodoButton: typeof import('./../src/components/TodoButton.vue')['default'] } } diff --git a/types/env.d.ts b/types/env.d.ts index 264ded0..7d2fb9c 100644 --- a/types/env.d.ts +++ b/types/env.d.ts @@ -1,4 +1,5 @@ /// +/// interface ImportMetaEnv { readonly VITE_ENV_MODE: string