fn
runHookPhase
v0.0.1Runs all instance-level (plugin) hooks for a single phase, then the optional user per-request hook(s). Avoids allocating an intermediate array per call.
Signature
ts
export async function runHookPhase<C>(
instance: ReadonlyArray<FetchHook<C>> | undefined,
user: FetchHook<C> | ReadonlyArray<FetchHook<C>> | undefined,
context: C,
): Promise<void>{ ... }Type Parameters
CParameters
| Parameter | Type | Description |
|---|---|---|
instance | ReadonlyArray<FetchHook<C>> | undefined | — |
user | FetchHook<C> | ReadonlyArray<FetchHook<C>> | undefined | — |
context | C | — |
Returns
Promise<void>