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

Function effectImpl

repos/effect/packages/effect/src/Layer.ts:989–993  ·  view source on GitHub ↗
(
  service: Context.Key<I, S>,
  effect: Effect<S, E, R>
)

Source from the content-addressed store, hash-verified

987 * The `Effect` is executed in the scope of the layer, allowing for proper
988 * resource management.
989 *
990 * **Example** (Creating a layer from an effect)
991 *
992 * ```ts import.meta.vitest
993 * import { Context, Effect, Layer } from "effect"
994 *
995 * class Database extends Context.Service<Database, {
996 * readonly query: (sql: string) => Effect.Effect<string>

Callers 1

Layer.tsFile · 0.85

Calls 3

effectContextFunction · 0.85
mapMethod · 0.65
makeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…