ships.TypeAlias.BuildSlot - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / ships / BuildSlot
BuildSlot =
CoreBuildSlot|HardpointBuildSlot|OptionalBuildSlot|SimpleBuildSlot
Defined in: src/ships/slots.ts:271
One mount on a hull — its stable key, kind-specific fields, and size.
Checking kind narrows core, restriction and alsoTakes: core mounts always name
their CoreSlotType; hardpoint and optional restrictions cannot be mixed; only a
hardpoint can carry alsoTakes; utility, armour, and cargo-hatch mounts carry none of
the three fields.
import { getShipSlots } from '@elite-dangerous-almanac/core/ships/ships';
import { enumerateSlots } from '@elite-dangerous-almanac/core/ships/slots';
const slot = enumerateSlots(getShipSlots('Anaconda')!)[0]!;
if (slot.kind === 'hardpoint') {
slot.restriction; // HardpointRestriction | undefined
}