• Parameters

    • incObject: {
          propertyName: string;
          value: number;
      }

      The original incObject to be used.

      • propertyName: string
      • value: number
    • context: HookContext

    Returns Promise<{
        propertyName: string;
        value: number;
    }> | {
        propertyName: string;
        value: number;
    }

    The incObject to be used instead of the original incObject specified by the caller. Returning a rejected promise will block the operation and will return a rejected promise to the caller as well as trigger the onFailure() hook.

    A hook that is triggered before increment() operation.