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

Function getOrUndefinedUnsafe

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

Source from the content-addressed store, hash-verified

1065
1066/** @internal */
1067export const getOrUndefinedUnsafe = <A, Services = never>(self: Context<Services>, key: string): A | undefined => {
1068 const value = lookup(self, key)
1069 return value === notFound ? undefined : value as A
1070}
1071
1072/**
1073 * 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