FitIssue型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One thing a check found: its code, its level (error stops a build, note says what was decided) and a sentence saying it.
インポート
import type { FitIssue } from "@johnmorrisdotca/uchusen-rockets";
定義
interface FitIssue {
code: FitCode;
level: "error" | "note";
message: string;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
code | FitCode | |
level | "error" | "note" | "error" stops the build. "note" says what the check decided. |
message | string |
例
import { check, type FitIssue } from "@johnmorrisdotca/uchusen-rockets";
const issue: FitIssue | undefined = check({ rocket: "starship", variant: "v3", parts: { booster: "starship-v3-ship" } }).issues[0];
console.log(issue?.level, issue?.message);error Ship, Block 3 (V3) is a ship; this slot takes a booster.出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。