WeivData API Reference | ExWeiv Apps
    Preparing search index...

    Function beforeReplace

    • Type Parameters

      Parameters

      • item: CItem

        The original item to be replaced.

      • context: HookContext

        Contextual information about the hook.

      Returns Record<string, any> | Promise<Record<string, any>>

      The item to be replaced instead of the original item 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 an replace() operation.