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

Method constructor

packages/reactivity/src/effectScope.ts:47–62  ·  view source on GitHub ↗
(public detached = false)

Source from the content-addressed store, hash-verified

45 // TODO isolatedDeclarations ReactiveFlags.SKIP
46
47 constructor(public detached = false) {
48 if (!detached && activeEffectScope) {
49 if (activeEffectScope.active) {
50 this.parent = activeEffectScope
51 this.index =
52 (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
53 this,
54 ) - 1
55 } else {
56 // The parent scope has already stopped, so this child must not become
57 // a detached live scope.
58 this._active = false
59 this._warnOnRun = false
60 }
61 }
62 }
63
64 get active(): boolean {
65 return this._active

Callers

nothing calls this directly

Calls 1

pushMethod · 0.65

Tested by

no test coverage detected