Interface BaseHook<T, BeforeHookReturn, HooksReturn>

interface BaseHook<T, BeforeHookReturn, HooksReturn> {
    after?(hookContext, evaluationDetails, hookHints?): HooksReturn;
    before?(hookContext, hookHints?): BeforeHookReturn;
    error?(hookContext, error, hookHints?): HooksReturn;
    finally?(hookContext, hookHints?): HooksReturn;
}

Type Parameters

Methods

  • Runs after all other hook stages, regardless of success or error. Errors thrown here are unhandled by the client and will surface in application code.

    Parameters

    • hookContext: Readonly<HookContext<T>>
    • Optional hookHints: Readonly<Record<string, unknown>>

    Returns HooksReturn

Generated using TypeDoc