This commit is contained in:
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"typescript.tsdk": "node_modules/typescript/lib",
|
"js/ts.tsdk.path": "node_modules/typescript/lib",
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll.biome": "explicit"
|
"source.fixAll.biome": "explicit"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { Array, Chunk, Effect, Function, Option, Pipeable, Predicate, Readable, Stream, type SubscriptionRef, type SynchronizedRef } from "effect"
|
import { Array, Chunk, Effect, Function, identity, Option, Pipeable, Predicate, Readable, Stream, type SubscriptionRef, type SynchronizedRef } from "effect"
|
||||||
import * as Cause from "effect/Cause"
|
|
||||||
import type { NoSuchElementException } from "effect/Cause"
|
import type { NoSuchElementException } from "effect/Cause"
|
||||||
import * as Subscribable from "./Subscribable.js"
|
import * as Subscribable from "./Subscribable.js"
|
||||||
|
|
||||||
@@ -437,14 +436,8 @@ export const focusOption: {
|
|||||||
self: Lens<Option.Option<A>, ER, EW, RR, RW>,
|
self: Lens<Option.Option<A>, ER, EW, RR, RW>,
|
||||||
): Lens<A, ER | NoSuchElementException, EW | NoSuchElementException, RR, RW> => mapEffect(
|
): Lens<A, ER | NoSuchElementException, EW | NoSuchElementException, RR, RW> => mapEffect(
|
||||||
self,
|
self,
|
||||||
option => Option.match(option, {
|
identity,
|
||||||
onSome: value => Effect.succeed(value),
|
(a, b) => Effect.map(a, () => Option.some(b)),
|
||||||
onNone: () => Effect.fail(new Cause.NoSuchElementException()),
|
|
||||||
}),
|
|
||||||
(option, value) => Option.match(option, {
|
|
||||||
onSome: () => Effect.succeed(Option.some(value)),
|
|
||||||
onNone: () => Effect.fail(new Cause.NoSuchElementException()),
|
|
||||||
}),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user