RoomSpec型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One room: its id, the name a cutaway labels it with, its job, and its size in metres.
インポート
import type { RoomSpec } from "@johnmorrisdotca/uchusen-rockets";
定義
interface RoomSpec {
id: RoomKind;
name: string;
job: string;
size: readonly [
number,
number,
number
];
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
id | RoomKind | |
name | string | The name a cutaway labels it with. |
job | string | What it is for, in a line. |
size | readonly [number, number, number] | Floor size in metres: width, depth, and the height of the room. |
例
import { ROOMS, type RoomSpec } from "@johnmorrisdotca/uchusen-rockets";
const mess: RoomSpec = ROOMS.mess;
console.log(mess.name, mess.size);Mess and galley [ 7, 5, 2.8 ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。