MCPcopy Index your code
hub / github.com/Effect-TS/effect / allSuccesses

Function allSuccesses

packages/effect/src/internal/fiberRuntime.ts:2010–2021  ·  view source on GitHub ↗
(
  elements: Iterable<Eff>,
  options?: {
    readonly concurrency?: Concurrency | undefined
    readonly batching?: boolean | "inherit" | undefined
    readonly concurrentFinalizers?: boolean | undefined
  }
)

Source from the content-addressed store, hash-verified

2008
2009/* @internal */
2010export const allSuccesses = <Eff extends Effect.Effect<any, any, any>>(
2011 elements: Iterable<Eff>,
2012 options?: {
2013 readonly concurrency?: Concurrency | undefined
2014 readonly batching?: boolean | "inherit" | undefined
2015 readonly concurrentFinalizers?: boolean | undefined
2016 }
2017): Effect.Effect<Array<Effect.Effect.Success<Eff>>, never, Effect.Effect.Context<Eff>> =>
2018 core.map(
2019 all(RA.fromIterable(elements).map(core.exit), options),
2020 RA.filterMap((exit) => core.exitIsSuccess(exit) ? Option.some(exit.effect_instruction_i0) : Option.none())
2021 )
2022
2023/* @internal */
2024export const replicate = dual<

Callers

nothing calls this directly

Calls 2

allFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…