ships.Function.hasFrameShiftDriveJumpStats - Elite-Dangerous-Almanac/Almanac-Core GitHub Wiki

@elite-dangerous-almanac/core / ships / hasFrameShiftDriveJumpStats

Function: hasFrameShiftDriveJumpStats()

hasFrameShiftDriveJumpStats<T>(module): module is T & FrameShiftDriveJumpStats

Defined in: src/ships/module-capabilities.ts:130

Test for complete frame-shift-drive jump constants.

Type Parameters

T

T extends OutfittingModuleStats

Parameters

module

T | null | undefined

A catalogue result or custom sparse record, including null.

Returns

module is T & FrameShiftDriveJumpStats

Whether all fields in FrameShiftDriveJumpStats are numeric.

Example

import type { OutfittingModuleStats } from '@elite-dangerous-almanac/core/ships/modules';
import { singleJumpRange } from '@elite-dangerous-almanac/core/ships/jump-range';
import { hasFrameShiftDriveJumpStats } from '@elite-dangerous-almanac/core/ships/module-capabilities';

declare const record: OutfittingModuleStats | null;

if (hasFrameShiftDriveJumpStats(record)) singleJumpRange(500, record.maxFuel, record);
⚠️ **GitHub.com Fallback** ⚠️