File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -4,21 +4,33 @@ import { warn } from './warning'
4
4
let activeEffectScope : EffectScope | undefined
5
5
6
6
export class EffectScope {
7
+ /**
8
+ * @internal
9
+ */
7
10
active = true
11
+ /**
12
+ * @internal
13
+ */
8
14
effects : ReactiveEffect [ ] = [ ]
15
+ /**
16
+ * @internal
17
+ */
9
18
cleanups : ( ( ) => void ) [ ] = [ ]
10
19
11
20
/**
12
21
* only assinged by undetached scope
22
+ * @internal
13
23
*/
14
24
parent : EffectScope | undefined
15
25
/**
16
26
* record undetached scopes
27
+ * @internal
17
28
*/
18
29
scopes : EffectScope [ ] | undefined
19
30
/**
20
31
* track a child scope's index in its parent's scopes array for optimized
21
32
* removal
33
+ * @internal
22
34
*/
23
35
private index : number | undefined
24
36
@@ -46,10 +58,18 @@ export class EffectScope {
46
58
}
47
59
}
48
60
61
+ /**
62
+ * This should only be called on non-detached scopes
63
+ * @internal
64
+ */
49
65
on ( ) {
50
66
activeEffectScope = this
51
67
}
52
68
69
+ /**
70
+ * This should only be called on non-detached scopes
71
+ * @internal
72
+ */
53
73
off ( ) {
54
74
activeEffectScope = this . parent
55
75
}
You can’t perform that action at this time.
0 commit comments