(fn: () => T)
| 101 | } |
| 102 | |
| 103 | run<T>(fn: () => T): T | undefined { |
| 104 | if (this._active) { |
| 105 | const currentEffectScope = activeEffectScope |
| 106 | try { |
| 107 | activeEffectScope = this |
| 108 | return fn() |
| 109 | } finally { |
| 110 | activeEffectScope = currentEffectScope |
| 111 | } |
| 112 | } else if (__DEV__ && this._warnOnRun) { |
| 113 | warn(`cannot run an inactive effect scope.`) |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | prevScope: EffectScope | undefined |
| 118 | /** |