Skip to content

effect@2.2.5

Choose a tag to compare

@github-actions github-actions released this 07 Feb 22:49
· 7804 commits to main since this release
e2f1ffb

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