Interface Options<TAmended>

Type Parameters

  • TAmended extends object

    Amended entity type.

Hierarchy

  • Options

Properties

Methods

Properties

base: TAmended

An amended entity the created target will be based on initially.

Methods

  • Amends the target entity.

    Applies the given amendment request to the base amended entity.

    The returned amendment target draft builder function will be used to build a modified amendment target.

    This method is called at leas once to build the initial amendment target. Then it will be called on each amendment, unless overridden by further amendment requests.

    Type Parameters

    • TBase extends object

      A type of the entity to amend.

    • TExt extends object

    Parameters

    • this: void
    • base: TBase

      An entity to amend.

    • Optional request: AmendRequest<TBase, TExt>

      Amendment request.

    Returns void | ((this) => Draft<TBase & TExt>)

    Either a function without arguments that creates a draft of modified amendment target, or nothing to construct it by objects spread operator. The returned function will be called at most once.

Generated using TypeDoc