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 d1715e4 commit ba8eef1Copy full SHA for ba8eef1
src/reactivity/ref.ts
@@ -112,6 +112,8 @@ export function createRef<T>(options: RefOption<T>) {
112
113
type RefValue<T> = T extends Ref<infer V> ? V : UnwrapRef<T>;
114
115
+export function ref<T extends object>(value: T): T extends Ref ? T : Ref<UnwrapRef<T>>;
116
+export function ref<T>(value: T): Ref<UnwrapRef<T>>;
117
// without init value, explicit typed: a = ref<{ a: number }>()
118
// typeof a will be Ref<{ a: number } | undefined>
119
export function ref<T = undefined>(): Ref<T | undefined>;
0 commit comments