MCPcopy
hub / github.com/Effect-TS/effect / withConsoleScoped

Function withConsoleScoped

packages/effect/src/internal/console.ts:38–42  ·  view source on GitHub ↗
(console: A)

Source from the content-addressed store, hash-verified

36
37/** @internal */
38export const withConsoleScoped = <A extends Console.Console>(console: A): Effect.Effect<void, never, Scope.Scope> =>
39 fiberRuntime.fiberRefLocallyScopedWith(
40 defaultServices.currentServices,
41 Context.add(defaultConsole.consoleTag, console)
42 )
43
44/** @internal */
45export const setConsole = <A extends Console.Console>(console: A): Layer.Layer<never> =>

Callers

nothing calls this directly

Calls 1

addMethod · 0.65

Tested by

no test coverage detected