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

Function fromPubSub

packages/effect/src/Channel.ts:1459–1461  ·  view source on GitHub ↗
(
  pubsub: PubSub.PubSub<A>
)

Source from the content-addressed store, hash-verified

1457 * @since 2.0.0
1458 */
1459export const fromPubSub = <A>(
1460 pubsub: PubSub.PubSub<A>
1461): Channel<A> => unwrap(Effect.map(PubSub.subscribe(pubsub), fromSubscription))
1462
1463/**
1464 * Creates a channel from a PubSub that outputs arrays of values.

Callers

nothing calls this directly

Calls 3

unwrapFunction · 0.70
subscribeMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected