()
| 1431 | * @since 4.0.0 |
| 1432 | */ |
| 1433 | export function some<A>(): Prism<Option.Option<A>, A> { |
| 1434 | const run = runRefinement(Option.isSome, { expected: "a Some value" }) |
| 1435 | return makePrism( |
| 1436 | (s) => Result.map(run(s), (s) => s.value), |
| 1437 | Option.some |
| 1438 | ) |
| 1439 | } |
| 1440 | |
| 1441 | /** |
| 1442 | * Prism that focuses on `Option.None`, exposing `undefined`. |
nothing calls this directly
no test coverage detected