ResolvedOutcome<Result>
ts
type ResolvedOutcome<Result> =
| {
type: "result";
result: Result;
explanation: string;
}
| {
type: "error";
error: Error;
explanation: string;
};The AI's findings: its explanation of why the call failed and why its outcome is correct, with either the result the decorated method returns or the error the outcome ended with.
Type Parameters
Result
Result = unknown
Union Members
Type Literal
ts
{
type: "result";
result: Result;
explanation: string;
}type
ts
type: "result";result
ts
result: Result;The value the decorated method returns.
explanation
ts
explanation: string;Why the call failed and why this value is correct; redaction placeholders are restored.
Type Literal
ts
{
type: "error";
error: Error;
explanation: string;
}type
ts
type: "error";error
ts
error: Error;The custom or fallback error the AI picked, or what failed while applying its outcome.
explanation
ts
explanation: string;Why the call failed and why the AI picked this outcome; redaction placeholders are restored.