Reference · Rolls and exact odds
NotationChecktype
What checkNotation found: the spec, or the part it refused and why.
Import it
import type { NotationCheck } from "@johnmorrisdotca/korokoro";
Definition
type NotationCheck = {
ok: true;
spec: RollSpec;
} | {
ok: false;
problem: NotationProblem;
part: string;
message: string;
};
Examples
import type { NotationCheck } from "@johnmorrisdotca/korokoro";
import { checkNotation } from "@johnmorrisdotca/korokoro";
const value: NotationCheck = checkNotation("2d6");
console.log(value.ok);trueWhat it prints (run when this page was built)