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 93e0c82 commit 779f37dCopy full SHA for 779f37d
src/reactivity/ref.ts
@@ -81,6 +81,8 @@ export function createRef<T>(options: RefOption<T>) {
81
82
type RefValue<T> = T extends Ref<infer V> ? V : UnwrapRef<T>;
83
84
+export function ref<T extends object>(value: T): T extends Ref ? T : Ref<UnwrapRef<T>>;
85
+export function ref<T>(value: T): Ref<UnwrapRef<T>>;
86
// without init value, explicit typed: a = ref<{ a: number }>()
87
// typeof a will be Ref<{ a: number } | undefined>
88
export function ref<T = any>(): Ref<T | undefined>;
0 commit comments