]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: trim non-public properties on EffectScope type
authorEvan You <yyx990803@gmail.com>
Tue, 12 Apr 2022 07:56:57 +0000 (15:56 +0800)
committerEvan You <yyx990803@gmail.com>
Tue, 12 Apr 2022 07:57:07 +0000 (15:57 +0800)
packages/reactivity/src/effectScope.ts

index 01499c5a78e82763e5876f4d02908d27adbfdbfc..e80a4f61d1d7e40d3faf012d5d4bb9f663e9a8c7 100644 (file)
@@ -4,21 +4,33 @@ import { warn } from './warning'
 let activeEffectScope: EffectScope | undefined
 
 export class EffectScope {
+  /**
+   * @internal
+   */
   active = true
+  /**
+   * @internal
+   */
   effects: ReactiveEffect[] = []
+  /**
+   * @internal
+   */
   cleanups: (() => void)[] = []
 
   /**
    * only assinged by undetached scope
+   * @internal
    */
   parent: EffectScope | undefined
   /**
    * record undetached scopes
+   * @internal
    */
   scopes: EffectScope[] | undefined
   /**
    * track a child scope's index in its parent's scopes array for optimized
    * removal
+   * @internal
    */
   private index: number | undefined
 
@@ -46,10 +58,18 @@ export class EffectScope {
     }
   }
 
+  /**
+   * This should only be called on non-detached scopes
+   * @internal
+   */
   on() {
     activeEffectScope = this
   }
 
+  /**
+   * This should only be called on non-detached scopes
+   * @internal
+   */
   off() {
     activeEffectScope = this.parent
   }