import type { TransformOutputRow, TransformOutputs } from './transform-reduce.js'; import { type TransformGroupRow, type TransformGroupSpec, type TransformLineage, type TransformValue } from './transform.js'; interface BinOptionsBase, TBy extends TransformGroupSpec | undefined> { value: TValue; by?: TBy; thresholds?: number | readonly number[] | ((values: readonly number[], minimum: number, maximum: number) => number); domain?: readonly [number, number]; } export type BinOptions = BinOptionsBase, TransformGroupSpec | undefined> & { outputs?: TransformOutputs; }; type DefaultBinOptions, TBy extends TransformGroupSpec | undefined> = BinOptionsBase & { outputs?: never; }; type InferredBinOptions, TBy extends TransformGroupSpec | undefined, TOutputs extends TransformOutputs> = BinOptionsBase & { outputs: TOutputs; }; export type BinXDatum = TransformLineage & TransformGroupRow & TransformOutputRow & { readonly x: number; readonly x1: number; readonly x2: number; }; export type BinYDatum = TransformLineage & TransformGroupRow & TransformOutputRow & { readonly y: number; readonly y1: number; readonly y2: number; }; type DefaultBinOutput = { readonly value: number; }; export declare function binX, const TBy extends TransformGroupSpec | undefined = undefined>(source: Iterable, options: DefaultBinOptions): BinXDatum[]; export declare function binX, const TBy extends TransformGroupSpec | undefined, const TOutputs extends TransformOutputs>(source: Iterable, options: InferredBinOptions): BinXDatum[]; export declare function binY, const TBy extends TransformGroupSpec | undefined = undefined>(source: Iterable, options: DefaultBinOptions): BinYDatum[]; export declare function binY, const TBy extends TransformGroupSpec | undefined, const TOutputs extends TransformOutputs>(source: Iterable, options: InferredBinOptions): BinYDatum[]; export {};