We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a306658 commit 643ff23Copy full SHA for 643ff23
packages/reactivity/src/ref.ts
@@ -29,13 +29,13 @@ export function isRef(r: any): r is Ref {
29
}
30
31
export function ref<T>(value: T): T extends Ref ? T : Ref<UnwrapRef<T>>
32
-export function ref<T = any>(): Ref<T>
+export function ref<T = any>(): Ref<T | undefined>
33
export function ref(value?: unknown) {
34
return createRef(value)
35
36
37
export function shallowRef<T>(value: T): T extends Ref ? T : Ref<T>
38
-export function shallowRef<T = any>(): Ref<T>
+export function shallowRef<T = any>(): Ref<T | undefined>
39
export function shallowRef(value?: unknown) {
40
return createRef(value, true)
41
0 commit comments