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

Function scopedWith

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

Source from the content-addressed store, hash-verified

2085
2086/** @internal */
2087export const scopedWith = <A, E, R>(
2088 f: (scope: Scope.Scope) => Effect.Effect<A, E, R>
2089): Channel.Channel<A, unknown, E, unknown, unknown, unknown, R> =>
2090 unwrapScoped(Effect.map(Effect.scope, (scope) => core.flatMap(core.fromEffect(f(scope)), core.write)))
2091
2092/** @internal */
2093export const service = <I, S>(

Callers 1

unwrapScopedWithFunction · 0.70

Calls 4

fromEffectMethod · 0.80
unwrapScopedFunction · 0.70
mapMethod · 0.65
fFunction · 0.50

Tested by

no test coverage detected