Reference · Rockets, variants, parts and the fit check
FitReporttype
The answer of check: whether the parts go together, the issues, the label to call the rocket, whether it is a custom build, the variant, the parts, the size and the credits of every licensed model.
Import it
import type { FitReport } from "@johnmorrisdotca/uchusen-rockets";
Definition
interface FitReport {
ok: boolean;
issues: readonly FitIssue[];
label: string;
custom: boolean;
variant: Variant | null;
parts: readonly SlotPart[];
size: {
height: number;
diameter: number;
} | null;
credits: readonly (ModelCredit & {
id: CreditId;
usedFor: readonly string[];
})[];
}
Members
| Name | Type | Description |
|---|---|---|
ok | boolean | |
issues | readonly FitIssue[] | |
label | string | What to call it: a real variant's name, or a plain words label for a mix. |
custom | boolean | True when any part is not true for the named variant: never presented as a vehicle that flew. |
variant | Variant | null | |
parts | readonly SlotPart[] | The parts, bottom up. |
size | { height: number; diameter: number; } | null | Metres, as drawn: the parts' heights added, the widest diameter. Null when it does not fit. |
credits | readonly (ModelCredit & { id: CreditId; usedFor: readonly string[]; })[] | Whose work each licensed part is. Empty when only this package's code is used. |
Examples
import { check, type FitReport } from "@johnmorrisdotca/uchusen-rockets";
const report: FitReport = check({ rocket: "falcon-9", variant: "block-5" });
console.log(report.ok, report.size);true { height: 69.8, diameter: 5.2 }What it prints (run when this page was built)