Minor Changes
-
#3410
2f456cc
Thanks @vinassefranche! - preserveArray.modify
Array.modifyOption
non emptiness -
#3410
8745e41
Thanks @patroza! - improve: type Fiber.awaitAll as Exit<A, E>[]. -
#3410
e557838
Thanks @titouancreach! - New constructor Config.nonEmptyString -
#3410
d6e7e40
Thanks @KhraksMamtsov! - preserveArray.replace
Array.replaceOption
non emptiness -
#3410
8356321
Thanks @KhraksMamtsov! - addEffect.bindAll
apiThis api allows you to combine
Effect.all
withEffect.bind
. It is useful
when you want to concurrently run multiple effects and then combine their
results in a Do notation pipeline.import { Effect } from "effect" const result = Effect.Do.pipe( Effect.bind("x", () => Effect.succeed(2)), Effect.bindAll( ({ x }) => ({ a: Effect.succeed(x + 1), b: Effect.succeed("foo") }), { concurrency: 2 } ) ) assert.deepStrictEqual(Effect.runSync(result), { x: 2, a: 3, b: "foo" })
-
#3410
192f2eb
Thanks @tim-smart! - addpropagateInterruption
option to Fiber{Handle,Set,Map}This option will send any external interrupts to the .join result.
-
#3410
718cb70
Thanks @dilame! - feat(Stream): implementrace
operator, which accepts two upstreams and returns a stream that mirrors the first upstream to emit an item and interrupts the other upstream.import { Stream, Schedule, Console, Effect } from "effect" const stream = Stream.fromSchedule(Schedule.spaced("2 millis")).pipe( Stream.race(Stream.fromSchedule(Schedule.spaced("1 millis"))), Stream.take(6), Stream.tap((n) => Console.log(n)) ) Effect.runPromise(Stream.runDrain(stream)) // Output each millisecond from the first stream, the rest streams are interrupted // 0 // 1 // 2 // 3 // 4 // 5
-
#3410
e9d0310
Thanks @mikearnaldi! - Avoid automatic propagation of finalizer concurrency, closes #3440 -
#3410
6bf28f7
Thanks @tim-smart! - add Context.getOrElse api, for gettings a Tag's value with a fallback
Patch Changes
- #3410
db89601
Thanks @juliusmarminge! - addMicro.isMicroCause
guard