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

Function compose

repos/effect/packages/effect/src/Optic.ts:440–453  ·  view source on GitHub ↗
(a: Node, b: Node)

Source from the content-addressed store, hash-verified

438 *
439 * @see {@link makeOptional} — constructor
440 * @see {@link Lens} — when reading always succeeds
441 * @see {@link Prism} — when writing always succeeds
442 *
443 * @category models
444 * @since 4.0.0
445 */
446export interface Optional<in out S, in out A> {
447 /**
448 * Attempts to read the focus `A` from the whole `S`. Returns
449 * `Result.Success<A>` when the focus exists, or
450 * `Result.Failure<SchemaIssue.Issue>` with a structured issue otherwise.
451 */
452 readonly getResult: (s: S) => Result.Result<A, SchemaIssue.Issue>
453 /**
454 * Replaces the focus in `S` with a new `A`. Returns the original `s`
455 * unchanged when the optic cannot focus (never throws).
456 */

Callers 9

serveFunction · 0.90
toWebHandlerFunction · 0.90
composeMethod · 0.70
keyMethod · 0.70
optionalKeyMethod · 0.70
checkMethod · 0.70
refineMethod · 0.70
tagMethod · 0.70
atMethod · 0.70

Calls 1

collectFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…