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

Method run

packages/reactivity/src/effectScope.ts:103–115  ·  view source on GitHub ↗
(fn: () => T)

Source from the content-addressed store, hash-verified

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 /**

Callers

nothing calls this directly

Calls 2

warnFunction · 0.90
fnFunction · 0.50

Tested by

no test coverage detected