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

Function accessCn

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

Source from the content-addressed store, hash-verified

88
89/** Accessor for a service property (constant). Wraps via `useSync`. */
90export const accessCn = <
91 Self extends object,
92 Shape extends Record<PropertyKey, any>,
93 K extends keyof Shape
94>(
95 Tag: Opaque<Self, Shape>,
96 key: K
97): Effect.Effect<Shape[K], never, Self> => Tag.useSync((s) => s[key])
98
99/** Accessor for a service property that is an Effect. Delegates via `use`. */
100export const accessEffectCn = <

Callers 1

I18nClass · 0.90

Calls 1

useSyncMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…