Explorar el Código

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

re-fix #11564
山吹色御守 hace 7 meses
padre
commit
8620a616eb
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  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 {