MCPcopy Create free account
hub / github.com/Effect-TS/effect / unsafeGetReference

Function unsafeGetReference

packages/effect/src/internal/context.ts:240–242  ·  view source on GitHub ↗
(self: C.Context<Services>, tag: C.Reference<I, S>)

Source from the content-addressed store, hash-verified

238
239/** @internal */
240export const unsafeGetReference = <Services, I, S>(self: C.Context<Services>, tag: C.Reference<I, S>): S => {
241 return self.unsafeMap.has(tag.key) ? self.unsafeMap.get(tag.key) : getDefaultValue(tag)
242}
243
244/** @internal */
245export const unsafeGet = dual<

Callers

nothing calls this directly

Calls 2

getDefaultValueFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected