浏览代码

fix(types): set dom stub type to `never` instead of `{}` (#13915)

re-fix #11564
山吹色御守 7 月之前
父节点
当前提交
8620a616eb
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      packages/runtime-dom/src/index.ts

+ 1 - 2
packages/runtime-dom/src/index.ts

@@ -38,8 +38,7 @@ import type { VModelDirective } from './directives/vModel'
  *
  * To enable proper types, add `"dom"` to `"lib"` in your `tsconfig.json`.
  */
-type DomStub = {}
-type DomType<T> = typeof globalThis extends { window: unknown } ? T : DomStub
+type DomType<T> = typeof globalThis extends { window: unknown } ? T : never
 
 declare module '@vue/reactivity' {
   export interface RefUnwrapBailTypes {