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

Function makeContext

packages/effect/src/internal/context.ts:167–171  ·  view source on GitHub ↗
(unsafeMap: Map<string, any>)

Source from the content-addressed store, hash-verified

165
166/** @internal */
167export const makeContext = <Services>(unsafeMap: Map<string, any>): C.Context<Services> => {
168 const context = Object.create(ContextProto)
169 context.unsafeMap = unsafeMap
170 return context
171}
172
173const serviceNotFoundError = (tag: C.Tag<any, any>) => {
174 const error = new Error(`Service not found${tag.key ? `: ${String(tag.key)}` : ""}`)

Callers 6

context.tsFile · 0.85
makeFunction · 0.85
mergeAllFunction · 0.85
pickFunction · 0.85
omitFunction · 0.85
contextPatch.tsFile · 0.85

Calls 1

createMethod · 0.80

Tested by

no test coverage detected