]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(types): set dom stub type to `never` instead of `{}` (#13915)
author山吹色御守 <85992002+KazariEX@users.noreply.github.com>
Wed, 24 Sep 2025 09:04:51 +0000 (17:04 +0800)
committerGitHub <noreply@github.com>
Wed, 24 Sep 2025 09:04:51 +0000 (17:04 +0800)
re-fix #11564

packages/runtime-dom/src/index.ts

index 6abfbb52e5dab745ebf3e88557313d2b5efc7462..9b8782733d104ea9e38b7300d799c2b90d1b7dcc 100644 (file)
@@ -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 {