With<B, SB>: Omit<B,
    | "behaviors"
    | "defaults"
    | "set"
    | "with"> & {
    behaviors: B["behaviors"] & SB;
    defaults: StateOf<SB>;
    set(defaults: InputStateOf<SB>): With<B, SB>;
    with<const BL>(...behaviors: BL): With<B, With<SB, BL>>;
}

Type Parameters

Type declaration

  • behaviors: B["behaviors"] & SB
  • defaults: StateOf<SB>

    Access default state values.

  • set:function
    • Define an endpoint like this one with different defaults. Only updates values present in the input object.

      Parameters

      Returns With<B, SB>

  • with:function
    • Define an endpoint like this one with additional and/or replacement server behaviors.

      Type Parameters

      • const BL extends List

      Parameters

      • Rest...behaviors: BL

      Returns With<B, With<SB, BL>>