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

Function flatten

packages/effect/src/Channel.ts:3011–3036  ·  view source on GitHub ↗
(
  channels: Channel<
    Channel<OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>,
    OutErr1,
    OutDone1,
    InElem1,
    InErr1,
    InDone1,
    Env1
  >
)

Source from the content-addressed store, hash-verified

3009 * @since 2.0.0
3010 */
3011export const flatten = <
3012 OutElem,
3013 OutErr,
3014 OutDone,
3015 InElem,
3016 InErr,
3017 InDone,
3018 Env,
3019 OutErr1,
3020 OutDone1,
3021 InElem1,
3022 InErr1,
3023 InDone1,
3024 Env1
3025>(
3026 channels: Channel<
3027 Channel<OutElem, OutErr, OutDone, InElem, InErr, InDone, Env>,
3028 OutErr1,
3029 OutDone1,
3030 InElem1,
3031 InErr1,
3032 InDone1,
3033 Env1
3034 >
3035): Channel<OutElem, OutErr | OutErr1, OutDone1, InElem & InElem1, InErr & InErr1, InDone & InDone1, Env | Env1> =>
3036 flatMap(channels, identity_)
3037
3038/**
3039 * Flattens a channel that outputs arrays into a channel that outputs individual elements.

Callers 1

Stream.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected