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

Function wrapMap

packages/effect/src/unstable/rpc/Rpc.ts:1234–1239  ·  view source on GitHub ↗
(self: WrapperOr<A>, f: (value: A) => B)

Source from the content-addressed store, hash-verified

1232 * @since 4.0.0
1233 */
1234export const wrapMap = <A extends object, B extends object>(self: WrapperOr<A>, f: (value: A) => B): WrapperOr<B> => {
1235 if (isWrapper(self)) {
1236 return wrap(self)(f(self.value))
1237 }
1238 return f(self)
1239}
1240
1241/**
1242 * Wraps a response Effect or Stream so the RPC server executes it concurrently

Callers

nothing calls this directly

Calls 3

isWrapperFunction · 0.85
wrapFunction · 0.70
fFunction · 0.50

Tested by

no test coverage detected