Skip to content
Français

SpeculativeCandidate

import type { SpeculativeCandidate } from "@elie-laloum/outpost";
  • keyRequired
    string
    Unique name of 1 to 64 letters, digits, _ or -, starting with a letter or digit. It appears in the candidate’s branch name.
  • agentRequired
    DispatchAgent
    Agent that runs the candidate: one from createAgent() or createReplayAgent(), or a createFallbackAgent(). A quota fault that reaches the race, including one the fallback agent does not absorb, settles the candidate with status quota.
  • requestRequired
    Omit<DispatchOptions<T>, "signal" | "agent" | "continuation">
    Dispatch options for this candidate, such as brief and response. The race supplies agent and signal; continuation is not accepted.
export interface SpeculativeCandidate<T = undefined> {
  readonly key: string;
  readonly agent: DispatchAgent;
  readonly request: Omit<
    DispatchOptions<T>,
    "agent" | "signal" | "continuation"
  >;
}