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

Function accessEffectCn

packages/effect-app/src/Context.ts:100–108  ·  view source on GitHub ↗
(
  Tag: Opaque<Self, Shape>,
  key: K
)

Source from the content-addressed store, hash-verified

98
99/** Accessor for a service property that is an Effect. Delegates via `use`. */
100export const accessEffectCn = <
101 Self extends object,
102 Shape extends Record<PropertyKey, any>,
103 K extends keyof Shape
104>(
105 Tag: Opaque<Self, Shape>,
106 key: K
107): Shape[K] extends Effect.Effect<infer A, infer E, infer R> ? Effect.Effect<A, E, Self | R>
108 : never => Tag.use((s: any) => s[key]) as any
109
110export const TypeId = "~Context.Opaque"
111

Callers

nothing calls this directly

Calls 1

useMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…