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

Method compose

repos/effect/packages/effect/src/Optic.ts:537–537  ·  view source on GitHub ↗

* Composes this optic with another. The result type is the weakest of * the two: Iso + Iso = Iso, Lens + Prism = Optional, etc. * * **Example** (Composing a lens with a prism) * * ```ts * import { Optic, Option } from "effect" * * type State = { value: Option.Option }

(this: Iso<S, A>, that: Iso<A, B>)

Source from the content-addressed store, hash-verified

535 * Focuses on a key where setting `undefined` **removes** the key from the
536 * struct (or splices the element from an array/tuple).
537 *
538 * **Details**
539 *
540 * - The focus type becomes `A[Key] | undefined`.

Callers 10

Predicate.tst.tsFile · 0.65
Optic.tst.tsFile · 0.65
Optic.test.tsFile · 0.65
Predicate.test.tsFile · 0.65
Function.test.tsFile · 0.65
Schema.test.tsFile · 0.65
FiberSet.tsFile · 0.65
FiberHandle.tsFile · 0.65
FiberMap.tsFile · 0.65
composeMethod · 0.65

Implementers 1

OptionalImplrepos/effect/packages/effect/src/Optic

Calls

no outgoing calls

Tested by

no test coverage detected