types: improve type 'Ref' (#105)
This commit is contained in:
parent
9d6783053c
commit
5c1e42f754
@ -1,16 +1,13 @@
|
|||||||
import { effect, ReactiveEffect, activeReactiveEffectStack } from './effect'
|
import { effect, ReactiveEffect, activeReactiveEffectStack } from './effect'
|
||||||
import { UnwrapNestedRefs } from './ref'
|
import { Ref, UnwrapNestedRefs } from './ref'
|
||||||
import { isFunction } from '@vue/shared'
|
import { isFunction } from '@vue/shared'
|
||||||
|
|
||||||
export interface ComputedRef<T> {
|
export interface ComputedRef<T> extends Ref<T> {
|
||||||
_isRef: true
|
|
||||||
readonly value: UnwrapNestedRefs<T>
|
readonly value: UnwrapNestedRefs<T>
|
||||||
readonly effect: ReactiveEffect
|
readonly effect: ReactiveEffect
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface WritableComputedRef<T> {
|
export interface WritableComputedRef<T> extends Ref<T> {
|
||||||
_isRef: true
|
|
||||||
value: UnwrapNestedRefs<T>
|
|
||||||
readonly effect: ReactiveEffect
|
readonly effect: ReactiveEffect
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user