瀏覽代碼

fix(types): GlobalDirective / GlobalComponents should not be records

Evan You 1 年之前
父節點
當前提交
42e8df6203
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      packages/runtime-core/src/component.ts

+ 2 - 2
packages/runtime-core/src/component.ts

@@ -150,7 +150,7 @@ export interface ComponentCustomProps {}
  * }
  * ```
  */
-export interface GlobalDirectives extends Record<string, Directive> {}
+export interface GlobalDirectives {}
 
 /**
  * For globally defined Components
@@ -167,7 +167,7 @@ export interface GlobalDirectives extends Record<string, Directive> {}
  * }
  * ```
  */
-export interface GlobalComponents extends Record<string, Component> {
+export interface GlobalComponents {
   Teleport: DefineComponent<TeleportProps>
   Suspense: DefineComponent<SuspenseProps>
   KeepAlive: DefineComponent<KeepAliveProps>