Skip to content

Commit ea6fc84

Browse files
committed
chore: trim non-public properties on EffectScope type
1 parent f44087e commit ea6fc84

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Diff for: packages/reactivity/src/effectScope.ts

+20
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,33 @@ import { warn } from './warning'
44
let activeEffectScope: EffectScope | undefined
55

66
export class EffectScope {
7+
/**
8+
* @internal
9+
*/
710
active = true
11+
/**
12+
* @internal
13+
*/
814
effects: ReactiveEffect[] = []
15+
/**
16+
* @internal
17+
*/
918
cleanups: (() => void)[] = []
1019

1120
/**
1221
* only assinged by undetached scope
22+
* @internal
1323
*/
1424
parent: EffectScope | undefined
1525
/**
1626
* record undetached scopes
27+
* @internal
1728
*/
1829
scopes: EffectScope[] | undefined
1930
/**
2031
* track a child scope's index in its parent's scopes array for optimized
2132
* removal
33+
* @internal
2234
*/
2335
private index: number | undefined
2436

@@ -46,10 +58,18 @@ export class EffectScope {
4658
}
4759
}
4860

61+
/**
62+
* This should only be called on non-detached scopes
63+
* @internal
64+
*/
4965
on() {
5066
activeEffectScope = this
5167
}
5268

69+
/**
70+
* This should only be called on non-detached scopes
71+
* @internal
72+
*/
5373
off() {
5474
activeEffectScope = this.parent
5575
}

0 commit comments

Comments
 (0)