/** * This module contains type guards that can be used to determine which * plot data type you have when `UnionOfPlotDataTypes` is allowed. */ import { NumberOrDate, TimeUnit, TimeDelta, NumberOrTimeDelta } from './general'; import { FacetedData, FacetedPlotRef, HistogramData, PiePlotData, PlotRef, UnionOfPlotDataTypes } from './plots'; import { LinePlotData } from './plots/lineplot'; /** Determine if data is for a histogram plot. */ export declare function isHistogramData(data: UnionOfPlotDataTypes): data is HistogramData; /** Determine if data is for a pie plot. */ export declare function isPiePlotData(data: UnionOfPlotDataTypes): data is PiePlotData; /** Determine if data is for a line plot. */ export declare function isLinePlotData(data: UnionOfPlotDataTypes): data is LinePlotData; /** WARNING - THIS IS NOT A GOOD TEST. Date("22") is a valid date * luckily it's not used in any production code */ /** Determine if a NumberOrDate variable is a string that can be converted to a date */ export declare function isDate(date: NumberOrDate): date is string; export declare function isNumber(x: any): x is number; /** Determine if a date/time quantity is a TimeUnit */ export declare function isTimeUnit(maybeTimeUnit: string): maybeTimeUnit is TimeUnit; /** Determine if a NumberOrTimeDelta is a TimeDelta */ export declare function isTimeDelta(maybeTimeDelta: NumberOrTimeDelta): maybeTimeDelta is TimeDelta; /** Is data faceted or not? */ export declare function isFaceted(maybeFacetedData?: T | FacetedData): maybeFacetedData is FacetedData; /** Is this plot ref a FacetedPlotRef? */ export declare function isFacetedPlotRef(maybeFacetedPlotRef?: FacetedPlotRef | PlotRef): maybeFacetedPlotRef is FacetedPlotRef; export declare function isArrayOfNumbers(array: string[] | number[]): array is number[]; export declare function isArrayOfNumbersOrNulls(array: (string | number | null)[]): array is (number | null)[]; //# sourceMappingURL=guards.d.ts.map