We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28db2e6 commit 4db0085Copy full SHA for 4db0085
packages/runtime-dom/src/index.ts
@@ -26,9 +26,17 @@ import {
26
isString,
27
} from '@vue/shared'
28
29
+/**
30
+ * This is a stub implementation to prevent the need to use dom types.
31
+ *
32
+ * To enable proper types, add `"dom"` to `"lib"` in your `tsconfig.json`.
33
+ */
34
+type DomStub = {}
35
+type DomType<T> = typeof globalThis extends { window: unknown } ? T : DomStub
36
+
37
declare module '@vue/reactivity' {
38
export interface RefUnwrapBailTypes {
- runtimeDOMBailTypes: Node | Window
39
+ runtimeDOMBailTypes: DomType<Node | Window>
40
}
41
42
0 commit comments