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

Function none

packages/effect/src/Optic.ts:1472–1478  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1470 * @since 4.0.0
1471 */
1472export function none<A>(): Prism<Option.Option<A>, undefined> {
1473 const run = runRefinement(Option.isNone, { expected: "a None value" })
1474 return makePrism(
1475 (s) => Result.map(run(s), () => undefined),
1476 () => Option.none()
1477 )
1478}
1479
1480/**
1481 * Prism that focuses on the success value of a `Result`.

Callers

nothing calls this directly

Calls 4

runRefinementFunction · 0.85
makePrismFunction · 0.85
runFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected