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

Function getOrUndefinedUnsafe

packages/effect/src/Context.ts:948–951  ·  view source on GitHub ↗
(self: Context<Services>, key: string)

Source from the content-addressed store, hash-verified

946
947/** @internal */
948export const getOrUndefinedUnsafe = <A, Services = never>(self: Context<Services>, key: string): A | undefined => {
949 const value = lookup(self, key)
950 return value === notFound ? undefined : value as A
951}
952
953/**
954 * Gets the service for a key, throwing if an absent non-reference key cannot be

Callers 1

Context.tsFile · 0.85

Calls 1

lookupFunction · 0.70

Tested by

no test coverage detected