Reference · Rockets, variants, parts and the fit check
flightOffunction
The flight for a rocket's variant, when a page gives one.
Import it
import { flightOf } from "@johnmorrisdotca/uchusen-rockets";
Definition
function flightOf(rocket: string, variant: string | undefined): Flight | null
Parameters
| Name | Type | Description |
|---|---|---|
rocket | string | A rocket's id. |
variant | string | undefined | A variant's id, or undefined. |
Returns
Flight | null
The flight for that variant, or null when it has none.
Examples
import { flightOf } from "@johnmorrisdotca/uchusen-rockets";
console.log(flightOf("starship", "v3")?.name, flightOf("starship", "v4"));Starship flight test 12 nullWhat it prints (run when this page was built)