Function: validateInterruptAnswer()
validateInterruptAnswer(
spec,value):InterruptAnswer
Defined in: packages/core/src/interrupt/types.ts:144
Validate a resume value against the stored interrupt spec (never trust
client-claimed kinds).
Parameters
spec
{ cancelLabel?: string; confirmLabel?: string; id?: string; kind: "confirm"; prompt: string; } | { id?: string; kind: "text"; maxLength?: number; placeholder?: string; prompt: string; } | { id?: string; kind: "choice"; multiple?: boolean; options: object[]; prompt: string; } | { id?: string; kind: "number"; max: number; min: number; prompt: string; step?: number; } | { accept?: string[]; id?: string; kind: "file"; maxBytes?: number; prompt: string; } | { id?: string; kind: "encrypted"; prompt: string; purpose?: "password" | "secret" | "api_key"; }
value
unknown