/** * Data point type guards and utilities for the RenderCoordinator. * * These pure functions handle the dual data format system (tuple vs object) * and provide type-safe access to point coordinates. * * @module dataPointUtils */ import type { DataPoint, DataPointTuple, OHLCDataPoint, OHLCDataPointTuple } from '../../../config/types'; /** * Validates that a number is finite, returning the number or null. * * @param v - Value to validate * @returns The number if finite, otherwise null */ export declare const finiteOrNull: (v: number | null | undefined) => number | null; /** * Validates that a number is finite, returning the number or undefined. * * @param v - Value to validate * @returns The number if finite, otherwise undefined */ export declare const finiteOrUndefined: (v: number | undefined) => number | undefined; /** * Compile-time exhaustiveness check for error handling. * Used in switch statements to ensure all cases are handled. * * @param value - The value that should be of type `never` if all cases are handled * @throws Always throws an error if called */ export declare const assertUnreachable: (value: never) => never; /** * Type guard: checks if a DataPoint is in tuple form `[x, y]`. * * @param p - The data point to check * @returns True if the point is a tuple, false if it's an object */ export declare const isTupleDataPoint: (p: DataPoint) => p is DataPointTuple; /** * Extracts x,y coordinates from either tuple or object point format. * * @param p - The data point (either tuple or object format) * @returns Object with x and y properties */ export declare const getPointXY: (p: DataPoint) => { readonly x: number; readonly y: number; }; /** * Type guard: checks if a data point is in tuple OHLC form `[timestamp, open, high, low, close]`. * * @param p - The OHLC data point to check * @returns True if the point is a tuple, false if it's an object */ export declare const isTupleOHLCDataPoint: (p: OHLCDataPoint) => p is OHLCDataPointTuple; /** * Type guard: checks if a data point is in tuple form `[x, y]` (for individual points). * * @param p - The point to check * @returns True if the point is a tuple array */ export declare const isTuplePoint: (p: unknown) => p is readonly [number, number]; /** * Type guard: checks if entire data array is in tuple format. * Only checks the first element for performance. * * @param data - Array of data points to check * @returns True if first element (and therefore likely all) is a tuple */ export declare const isTupleDataArray: (data: ReadonlyArray) => data is ReadonlyArray; //# sourceMappingURL=dataPointUtils.d.ts.map