Skip to content
Français

HarnessHook

import type { HarnessHook } from "@elie-laloum/outpost";
  • kindRequired
    "hook"
    Definition discriminator: hook.
  • onRequired
    Phase
    Loop point where the hook runs.
  • nameRequired
    string
    Name used for diagnostics.
  • runRequired
    (input: HarnessHookInput<Phase>) => HarnessHookResult<Phase> | Promise<HarnessHookResult<Phase>>
    Control function for this phase.
export interface HarnessHook<
  Phase extends HarnessHookPhase = HarnessHookPhase,
> {
  readonly kind: "hook";
  readonly on: Phase;
  readonly name: string;
  run(
    input: HarnessHookInput<Phase>,
  ): HarnessHookResult<Phase> | Promise<HarnessHookResult<Phase>>;
}