We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73fa91f commit fee6697Copy full SHA for fee6697
packages/runtime-dom/src/index.ts
@@ -33,9 +33,17 @@ import type { vShow } from './directives/vShow'
33
import type { VOnDirective } from './directives/vOn'
34
import type { VModelDirective } from './directives/vModel'
35
36
+/**
37
+ * This is a stub implementation to prevent the need to use dom types.
38
+ *
39
+ * To enable proper types, add `"dom"` to `"lib"` in your `tsconfig.json`.
40
+ */
41
+type DomStub = {}
42
+type DomType<T> = typeof globalThis extends { window: unknown } ? T : DomStub
43
+
44
declare module '@vue/reactivity' {
45
export interface RefUnwrapBailTypes {
- runtimeDOMBailTypes: Node | Window
46
+ runtimeDOMBailTypes: DomType<Node | Window>
47
}
48
49
0 commit comments