Skip to content

Commit

Permalink
Fix: [Client] グローバルコンポーネントの型定義を修正
Browse files Browse the repository at this point in the history
"@vue/runtime-core" ではなく "vue" の型を拡張しないとすべての型が壊れてしまう
ref: nuxt/nuxt#28542
  • Loading branch information
tsukumijima committed Aug 29, 2024
1 parent 3e584d9 commit a38dde5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/src/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ declare module '*.vue' {

// **** ライブラリの型定義 *****

// グローバルコンポーネント
declare module '@vue/runtime-core' {
// グローバルコンポーネントの型定義
// "@vue/runtime-core" ではなく "vue" の型を拡張しないとすべての型が壊れてしまう
// ref: https://github.com/nuxt/nuxt/pull/28542
declare module 'vue' {
export interface GlobalComponents {
Icon: typeof Icon;
}
Expand Down

0 comments on commit a38dde5

Please sign in to comment.