File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change
1
+ import type { ComputedRef } from './computed'
1
2
import {
2
3
activeEffect ,
3
4
getDepFromReactive ,
@@ -210,7 +211,7 @@ export type MaybeRefOrGetter<T = any> = MaybeRef<T> | (() => T)
210
211
* @param ref - Ref or plain value to be converted into the plain value.
211
212
* @see {@link https://vuejs.org/api/reactivity-utilities.html#unref }
212
213
*/
213
- export function unref < T > ( ref : MaybeRef < T > ) : T {
214
+ export function unref < T > ( ref : MaybeRef < T > | ComputedRef < T > ) : T {
214
215
return isRef ( ref ) ? ref . value : ref
215
216
}
216
217
@@ -230,7 +231,7 @@ export function unref<T>(ref: MaybeRef<T>): T {
230
231
* @param source - A getter, an existing ref, or a non-function value.
231
232
* @see {@link https://vuejs.org/api/reactivity-utilities.html#tovalue }
232
233
*/
233
- export function toValue < T > ( source : MaybeRefOrGetter < T > ) : T {
234
+ export function toValue < T > ( source : MaybeRefOrGetter < T > | ComputedRef < T > ) : T {
234
235
return isFunction ( source ) ? source ( ) : unref ( source )
235
236
}
236
237
You can’t perform that action at this time.
0 commit comments