import type { Bar } from '../../api/types'; export declare class BarBuffer { private data; private _length; get length(): number; get capacity(): number; constructor(capacity?: number); /** Set from Bar array — replaces all data */ setFromBars(bars: Bar[]): void; /** Get a Bar object at index (allocates — use field accessors in hot paths) */ getBar(index: number): Bar | undefined; time(index: number): number; open(index: number): number; high(index: number): number; low(index: number): number; close(index: number): number; volume(index: number): number; /** Append a bar at the end */ push(bar: Bar): void; /** Update bar at index in place (zero allocation) */ updateAt(index: number, bar: Bar): void; /** Get price range (min low, max high) for index range [from, to) */ getPriceRange(from: number, to: number): { min: number; max: number; } | null; /** Get max volume in range [from, to) */ getMaxVolume(from: number, to: number): number; /** Binary search for nearest index to a timestamp */ nearestIndex(time: number): number; /** Prepend bars (for scroll-back history loading) */ prepend(bars: Bar[]): void; /** Get slice as Bar array */ getRange(from: number, to: number): Bar[]; private ensureCapacity; }