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

Function use

packages/effect/src/Context.ts:304–306  ·  view source on GitHub ↗
(this: Service<never, any>, f: (service: any) => Effect<A, E, R>)

Source from the content-addressed store, hash-verified

302 return make(this, self)
303 },
304 use<A, E, R>(this: Service<never, any>, f: (service: any) => Effect<A, E, R>): Effect<A, E, R> {
305 return withFiber((fiber) => f(get(fiber.context, this)))
306 },
307 useSync<A>(this: Service<never, any>, f: (service: any) => A): Effect<A, never, never> {
308 return withFiber((fiber) => exitSucceed(f(get(fiber.context, this))))
309 }

Callers 6

acquireUseReleaseFunction · 0.70
runConverterFunction · 0.70
withHandlerFunction · 0.50
withGeneratedModuleFunction · 0.50
withHandlerFunction · 0.50
withLayerFunction · 0.50

Calls 2

getFunction · 0.70
fFunction · 0.50

Tested by 3

withHandlerFunction · 0.40
withHandlerFunction · 0.40
withLayerFunction · 0.40