Reference · Rolls and exact odds
Exportedtype
A whole JSON export.
Import it
import type { Exported } from "@johnmorrisdotca/korokoro";
Definition
type Exported = {
format: typeof EXPORT_FORMAT;
generator: string;
rolls: ExportedRoll[];
stats?: Stats;
};
Members
| Name | Type | Description |
|---|---|---|
format | 1 | |
generator | string | |
rolls | ExportedRoll[] | |
stats (optional) | Stats | undefined |
Examples
import type { Exported } from "@johnmorrisdotca/korokoro";
import { DEFAULT_SPEC, rollFrom, toJSON } from "@johnmorrisdotca/korokoro";
const value: Exported = JSON.parse(toJSON([rollFrom(DEFAULT_SPEC, [2, 5], "saved", 0, null)!]));
console.log(value.format);1What it prints (run when this page was built)