NotationFault型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
Why a line of notation could not be read, and where.
インポート
import type { NotationFault } from "@johnmorrisdotca/kyuubu";
定義
type NotationFault = {
token: string;
at: number;
line: number;
column: number;
reason: "unknown" | "no-such-layer";
};
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
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. |
例
import type { NotationFault } from "@johnmorrisdotca/kyuubu";
const value: NotationFault = { token: "oops", at: 0, line: 1, column: 1, reason: "unknown" };
console.log(value.reason);unknown出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。