Skip to content
Français

HarnessHookOptions

import type { HarnessHookOptions } from "@elie-laloum/outpost";
  • onRequired
    Phase
    Loop point where the hook runs.
  • nameOptional
    string | undefined
    Name for diagnostics, default the phase name.
  • runRequired
    (input: HarnessHookInput<Phase>) => HarnessHookResult<Phase> | Promise<HarnessHookResult<Phase>>
    Control function for this phase. Hooks of a phase run in declaration order; an exception fails the turn, and an invalid decision fails it with code configuration.
export interface HarnessHookOptions<Phase extends HarnessHookPhase> {
  readonly on: Phase;
  readonly name?: string;
  run(
    input: HarnessHookInput<Phase>,
  ): HarnessHookResult<Phase> | Promise<HarnessHookResult<Phase>>;
}