Просмотр исходного кода

feat: extend GlobalComponents interface to include 'primitive' component type (#896)

* feat: extend GlobalComponents interface to include 'primitive' component type

* fix: extend GlobalComponents interface to include primitive components

* fix: augment only `vue` module
Alvaro Saburido 5 месяцев назад
Родитель
Сommit
b78a6ffabc
1 измененных файлов с 3 добавлено и 7 удалено
  1. 3 7
      src/types/index.ts

+ 3 - 7
src/types/index.ts

@@ -233,11 +233,7 @@ type TresComponents = {
 }
 
 declare module 'vue' {
-  export interface GlobalComponents extends TresComponents { }
-}
-declare module '@vue/runtime-core' {
-  interface GlobalComponents extends TresComponents { }
-}
-declare module '@vue/runtime-dom' {
-  interface GlobalComponents extends TresComponents {}
+  export interface GlobalComponents extends TresComponents {
+    primitive: DefineComponent<TresPrimitive>
+  }
 }