ships.Function.hasPowerGenerationStats - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki
@elite-dangerous-almanac/core / ships / hasPowerGenerationStats
hasPowerGenerationStats<
T>(module):module is T & PowerGenerationStats
Defined in: src/ships/module-capabilities.ts:151
Test for complete power-generation stats.
T extends OutfittingModuleStats
T | null | undefined
A catalogue result or custom sparse record, including null.
module is T & PowerGenerationStats
Whether both fields in PowerGenerationStats are numeric.
import type { OutfittingModule } from '@elite-dangerous-almanac/core/ships/modules';
declare const record: OutfittingModule | null;
import { hasPowerGenerationStats } from '@elite-dangerous-almanac/core/ships/module-capabilities';
if (hasPowerGenerationStats(record)) record.powerCapacity; // MW