MCPcopy Create free account
hub / github.com/effect-app/libs / use

Function use

repos/effect/packages/platform-node/src/NodeRedis.ts:41–45  ·  view source on GitHub ↗
(f: (client: IoRedis.Redis) => Promise<A>)

Source from the content-addressed store, hash-verified

39 const client = new IoRedis.Redis(options ?? {})
40
41 const use = <A>(f: (client: IoRedis.Redis) => Promise<A>) =>
42 Effect.tryPromise({
43 try: () => f(client),
44 catch: (cause) => new Redis.RedisError({ cause })
45 })
46
47 const redis = yield* Redis.make({
48 send: <A = unknown>(command: string, ...args: ReadonlyArray<string>) =>

Callers

nothing calls this directly

Calls 1

fFunction · 0.50

Tested by

no test coverage detected