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

Function getFailures

packages/effect/src/Array.ts:3694–3705  ·  view source on GitHub ↗
(
  self: T
)

Source from the content-addressed store, hash-verified

3692 * @since 4.0.0
3693 */
3694export const getFailures = <T extends Iterable<Result.Result<any, any>>>(
3695 self: T
3696): Array<Result.Result.Failure<ReadonlyArray.Infer<T>>> => {
3697 const out: Array<any> = []
3698 for (const a of self) {
3699 if (Result.isFailure(a)) {
3700 out.push(a.failure)
3701 }
3702 }
3703
3704 return out
3705}
3706
3707/**
3708 * Extracts all success values from an iterable of `Result`s, discarding

Callers

nothing calls this directly

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected