MCPcopy Create free account
hub / github.com/effect-app/libs / run

Function run

packages/vue/test/query-span.test.ts:37–45  ·  view source on GitHub ↗
(fn: () => T)

Source from the content-addressed store, hash-verified

35 app.use(VueQueryPlugin, { queryClient })
36 const scope = effectScope(true)
37 const run = <T>(fn: () => T): T => {
38 let out!: T
39 app.runWithContext(() => {
40 scope.run(() => {
41 out = fn()
42 })
43 })
44 return out
45 }
46 return { run, dispose: () => scope.stop() }
47}
48

Callers

nothing calls this directly

Calls 2

fnFunction · 0.50
runMethod · 0.45

Tested by

no test coverage detected