MCPcopy Index your code
hub / github.com/Effect-TS/effect / scopedWith

Function scopedWith

packages/effect/src/internal/fiberRuntime.ts:2863–2865  ·  view source on GitHub ↗
(
  f: (scope: Scope.Scope) => Effect.Effect<A, E, R>
)

Source from the content-addressed store, hash-verified

2861
2862/** @internal */
2863export const scopedWith = <A, E, R>(
2864 f: (scope: Scope.Scope) => Effect.Effect<A, E, R>
2865): Effect.Effect<A, E, R> => core.flatMap(scopeMake(), (scope) => core.onExit(f(scope), (exit) => scope.close(exit)))
2866
2867/* @internal */
2868export const scopedEffect = <A, E, R>(effect: Effect.Effect<A, E, R>): Effect.Effect<A, E, Exclude<R, Scope.Scope>> =>

Callers 1

fiberRuntime.tsFile · 0.70

Calls 4

scopeMakeFunction · 0.85
onExitMethod · 0.65
closeMethod · 0.65
fFunction · 0.50

Tested by

no test coverage detected