Browse Source

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

re-fix #11564
山吹色御守 7 months ago
parent
commit
8620a616eb
1 changed files with 1 additions and 2 deletions
  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 {