flightNow関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The assembly flight underway at at: flights are the build steps in the order they start, named like an ISS flight.
インポート
import { flightNow } from "@johnmorrisdotca/uchusen-rockets";
定義
function flightNow(steps: readonly PlayStep[], at: number): { n: number; slot: string; title: string; } | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
steps | readonly PlayStep[] | The ship's build order. |
at | number | How far through the build, from 0 to 1. |
戻り値
{ n: number; slot: string; title: string; } | null
The flight number, the slot and its title, or null when there are no steps.
例
import { buildOf, flightNow } from "@johnmorrisdotca/uchusen-rockets";
const now = flightNow(buildOf("miyamoto") ?? [], 0);
console.log(now?.n, now?.title);1 Drive出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。