Type alias ProposalResult<T>

ProposalResult<T>: {
    status: "kept";
    ledgerId: string;
    result: T;
} | {
    status: "written";
    result: T;
} | {
    status: "rejected";
    reason: "frozen" | "forgotten" | "write_failed" | "conflict" | "store_unavailable";
    ledgerId?: string;
    error?: unknown;
}

What a recorded memory write came to: kept with its ledger row; written with no ledger row (mode off or a suspension); or rejected, with the reason and, where one was written, the candidate's row.

Type Parameters

  • T = unknown

Type declaration

  • status: "kept"
  • ledgerId: string
  • result: T

Type declaration

  • status: "written"
  • result: T

Type declaration

  • status: "rejected"
  • reason: "frozen" | "forgotten" | "write_failed" | "conflict" | "store_unavailable"
  • Optional ledgerId?: string
  • Optional error?: unknown