github Effect-TS/effect effect@3.15.0

latest releases: @effect/ai-anthropic@0.16.2, @effect/ai-anthropic@0.16.1, @effect/cluster@0.48.3...
3 months ago

Minor Changes

  • #4641 c654595 Thanks @tim-smart! - Add Layer.setRandom, for over-riding the default Random service

  • #4641 d9f5dea Thanks @KhraksMamtsov! - Brand.unbranded getter has been added

  • #4641 49aa723 Thanks @titouancreach! - Add Either.transposeMapOption

  • #4641 74c14d0 Thanks @vinassefranche! - Add Record.findFirst

  • #4641 e4f49b6 Thanks @KhraksMamtsov! - Default never type has been added to MutableHasMap.empty & MutableList.empty ctors

  • #4641 6f02224 Thanks @tim-smart! - add Stream.toAsyncIterable* apis

    import { Stream } from "effect"
    
    // Will print:
    // 1
    // 2
    // 3
    const stream = Stream.make(1, 2, 3)
    for await (const result of Stream.toAsyncIterable(stream)) {
      console.log(result)
    }
  • #4641 1dcfd41 Thanks @tim-smart! - improve Effect.filter* types to exclude candidates in fallback functions

  • #4641 b21ab16 Thanks @KhraksMamtsov! - Simplified the creation of pipeable classes.

    class MyClass extends Pipeable.Class() {
      constructor(public a: number) {
        super()
      }
      methodA() {
        return this.a
      }
    }
    console.log(new MyClass(2).pipe((x) => x.methodA())) // 2
    class A {
      constructor(public a: number) {}
      methodA() {
        return this.a
      }
    }
    class B extends Pipeable.Class(A) {
      constructor(private b: string) {
        super(b.length)
      }
      methodB() {
        return [this.b, this.methodA()]
      }
    }
    console.log(new B("pipe").pipe((x) => x.methodB())) // ['pipe', 4]
  • #4641 fcf1822 Thanks @KhraksMamtsov! - property message: string has been added to ConfigError.And & Or members

  • #4641 0061dd1 Thanks @tim-smart! - allow catching multiple different tags in Effect.catchTag

  • #4641 8421e6e Thanks @mlegenhausen! - Expose Cause.isTimeoutException

  • #4641 fa10f56 Thanks @thewilkybarkid! - Support multiple values in Function.apply

Don't miss a new effect release

NewReleases is sending notifications on new releases.