ShipIssue型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
What went wrong with a ship: which place, and why.
インポート
import type { ShipIssue } from "@johnmorrisdotca/uchusen-rockets";
定義
interface ShipIssue {
place: number;
code: "unknown-module" | "collar-mismatch" | "no-such-port" | "port-taken" | "no-spine";
message: string;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
place | number | |
code | "unknown-module" | "collar-mismatch" | "no-such-port" | "port-taken" | "no-spine" | |
message | string |
例
import { assemble, type ShipIssue } from "@johnmorrisdotca/uchusen-rockets";
const issues: ShipIssue[] = assemble([{ module: "engine-fusion-7" }, { module: "container-12" }]).issues;
console.log(issues[0]?.code, issues[0]?.message);collar-mismatch Fusion engine cluster, 7 ends in a L collar and Heavy cargo container starts with a M.出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。