浏览代码

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 月之前
父节点
当前提交
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>
+  }
 }