github Effect-TS/effect effect@2.2.5

latest releases: @effect/typeclass@0.29.14, @effect/vitest@0.13.14, @effect/sql-sqlite-wasm@0.20.5...
9 months ago

Patch Changes

  • #2075 3ddfdbf Thanks @tim-smart! - add apis for manipulating context to the Runtime module

    These include:

    • Runtime.updateContext for modifying the Context directly
    • Runtime.provideService for adding services to an existing Runtime

    Example:

    import { Context, Runtime } from "effect";
    
    interface Name {
      readonly _: unique symbol;
    }
    const Name = Context.Tag<Name, string>("Name");
    
    const runtime: Runtime.Runtime<Name> = Runtime.defaultRuntime.pipe(
      Runtime.provideService(Name, "John"),
    );
  • #2075 3ddfdbf Thanks @tim-smart! - add apis for patching runtime flags to the Runtime module

    The apis include:

    • Runtime.updateRuntimeFlags for updating all the flags at once
    • Runtime.enableRuntimeFlag for enabling a single runtime flag
    • Runtime.disableRuntimeFlag for disabling a single runtime flag

Don't miss a new effect release

NewReleases is sending notifications on new releases.