Reference · Rules, games and records
ReplayErrortype
A refused record with its one-based line number and reason.
Import it
import type { ReplayError } from "@johnmorrisdotca/sugoroku";
Definition
type ReplayError = {
readonly ok: false;
readonly line: number;
readonly reason: string;
};
Members
| Name | Type | Description |
|---|---|---|
ok | false | |
line | number | The line the record went wrong on, counting from 1. |
reason | string |
Examples
import type { ReplayError } from "@johnmorrisdotca/sugoroku";
const value: ReplayError = {ok:false,line:1,reason:"Unknown record version"};
console.log(value);{ ok: false, line: 1, reason: 'Unknown record version' }What it prints (run when this page was built)