MCPcopy Create free account
hub / github.com/effect-app/libs / getSuccesses

Function getSuccesses

repos/effect/packages/effect/src/Record.ts:899–911  ·  view source on GitHub ↗
(
  self: ReadonlyRecord<K, Result<A, E>>
)

Source from the content-addressed store, hash-verified

897 *
898 * **Example** (Partitioning with Result)
899 *
900 * ```ts import.meta.vitest
901 * import { Record, Result } from "effect"
902 *
903 * const x = { a: 1, b: 2, c: 3 }
904 * const f = (n: number) => (n % 2 === 0 ? Result.succeed(n) : Result.fail(n))
905 * Record.partition(x, f) // => [{ a: 1, c: 3 }, { b: 2 }]
906 * ```
907 *
908 * @category filtering
909 * @since 2.0.0
910 */
911export const partition: {
912 <K extends string, A, B, C>(
913 f: (input: A, key: K) => Result<C, B>
914 ): (

Callers

nothing calls this directly

Calls 2

emptyFunction · 0.70
keysFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…