MCPcopy
hub / github.com/vuejs/core / ComputedRefImpl

Class ComputedRefImpl

packages/reactivity/src/computed.ts:47–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 * the main vue package
46 */
47export class ComputedRefImpl<T = any> implements Subscriber {
48 /**
49 * @internal
50 */
51 _value: any = undefined
52 /**
53 * @internal
54 */
55 readonly dep: Dep = new Dep(this)
56 /**
57 * @internal
58 */
59 readonly __v_isRef = true
60 // TODO isolatedDeclarations ReactiveFlags.IS_REF
61 /**
62 * @internal
63 */
64 readonly __v_isReadonly: boolean
65 // TODO isolatedDeclarations ReactiveFlags.IS_READONLY
66 // A computed is also a subscriber that tracks other deps
67 /**
68 * @internal
69 */
70 deps?: Link = undefined
71 /**
72 * @internal
73 */
74 depsTail?: Link = undefined
75 /**
76 * @internal
77 */
78 flags: EffectFlags = EffectFlags.DIRTY
79 /**
80 * @internal
81 */
82 globalVersion: number = globalVersion - 1
83 /**
84 * @internal
85 */
86 isSSR: boolean
87 /**
88 * @internal
89 */
90 next?: Subscriber = undefined
91
92 // for backwards compat
93 effect: this = this
94 // dev only
95 onTrack?: (event: DebuggerEvent) => void
96 // dev only
97 onTrigger?: (event: DebuggerEvent) => void
98
99 /**
100 * Dev only
101 * @internal
102 */
103 _warnRecursive?: boolean
104

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected