VariantFacts型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The sourced numbers of a variant: its height and diameter, each part's height by slot, its engines, other facts and any sizes that are not a height or a width.
インポート
import type { VariantFacts } from "@johnmorrisdotca/uchusen-rockets";
定義
interface VariantFacts {
height: Figure;
diameter: Figure;
parts: Readonly<Record<string, Figure>>;
engines: Readonly<Record<string, Figure<string>>>;
more: Readonly<Record<string, Figure<number | string>>>;
sizes?: Readonly<Record<string, Figure>>;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
height | Figure<number> | Overall height with every part in place, metres. |
diameter | Figure<number> | |
parts | Readonly<Record<string, Figure<number>>> | Each part's height by its slot, metres. |
engines | Readonly<Record<string, Figure<string>>> | Engines by slot. |
more | Readonly<Record<string, Figure<string | number>>> | Other facts, each with its own source. |
sizes (省略可) | Readonly<Record<string, Figure<number>>> | undefined | Sizes that are not a height or a width, shown as they are named here: "Deck length". |
例
import { variantOf, type VariantFacts } from "@johnmorrisdotca/uchusen-rockets";
const facts: VariantFacts | undefined = variantOf("falcon-9", "block-5")?.facts;
console.log(facts?.height.value, Object.keys(facts?.parts ?? {}));69.8 [ 'first-stage', 'second-stage', 'fairing' ]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。