()
| 1470 | * @since 4.0.0 |
| 1471 | */ |
| 1472 | export 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`. |
nothing calls this directly
no test coverage detected