Reference · Cube engine and views
NotationFaulttype
Why a line of notation could not be read, and where.
Import it
import type { NotationFault } from "@johnmorrisdotca/kyuubu";
Definition
type NotationFault = {
token: string;
at: number;
line: number;
column: number;
reason: "unknown" | "no-such-layer";
};
Members
| Name | Type | Description |
|---|---|---|
token | string | The piece of text that is not a move on this cube. |
at | number | Where it begins, counted in characters from 0. |
line | number | Its line, from 1. |
column | number | Its place in that line, from 1. |
reason | "unknown" | "no-such-layer" | What is wrong with it: not notation at all, or a layer this cube does not have. |
Examples
import type { NotationFault } from "@johnmorrisdotca/kyuubu";
const value: NotationFault = { token: "oops", at: 0, line: 1, column: 1, reason: "unknown" };
console.log(value.reason);unknownWhat it prints (run when this page was built)