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

Function fromPubSubTake

packages/effect/src/Channel.ts:1615–1618  ·  view source on GitHub ↗
(
  pubsub: PubSub.PubSub<Take.Take<A, E, Done>>
)

Source from the content-addressed store, hash-verified

1613 * @since 4.0.0
1614 */
1615export const fromPubSubTake = <A, E, Done>(
1616 pubsub: PubSub.PubSub<Take.Take<A, E, Done>>
1617): Channel<Arr.NonEmptyReadonlyArray<A>, E, Done> =>
1618 unwrap(Effect.map(PubSub.subscribe(pubsub), (sub) => fromEffectTake(PubSub.take(sub))))
1619
1620/**
1621 * Creates a Channel from a Schedule.

Callers

nothing calls this directly

Calls 5

fromEffectTakeFunction · 0.85
unwrapFunction · 0.70
subscribeMethod · 0.65
takeMethod · 0.65
mapMethod · 0.45

Tested by

no test coverage detected