phasePosition関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The place on the timeline of a phase by its id, or null for one the flight does not have.
インポート
import { phasePosition } from "@johnmorrisdotca/uchusen-rockets";
定義
function phasePosition(flight: Flight, id: string | null | undefined): number | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
flight | Flight | A flight. |
id | string | null | undefined | A phase's id, or null or undefined. |
戻り値
number | null
The place of that phase on the timeline, or null for an id the flight does not have.
例
import { flightOf, phasePosition } from "@johnmorrisdotca/uchusen-rockets";
const flight = flightOf("falcon-9", "block-5");
if (flight) console.log(phasePosition(flight, "nonsense"));null出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。