import Context from '../Context.class';
/**
 * A lightweight wrapper around arrays to provide Pine Script-like "series" access behavior.
 * Pine Script series are indexed relative to the current bar:
 * - series[0] is the current value
 * - series[1] is the previous value
 *
 * This class maps this reversed, relative indexing to the underlying chronological array
 * using the Context's current index.
 */
export declare class TimeSeries<T = any> {
    private readonly _data;
    private readonly _ctx;
    constructor(_data: T[], _ctx: Context);
    /**
     * Get the value at the specified offset from the current bar.
     * @param offset The lookback offset (0 = current, 1 = previous, etc.)
     */
    get(offset: number): T;
    /**
     * Set the value at the specified offset from the current bar.
     * Usually used for setting current value (offset 0).
     */
    set(offset: number, value: T): T;
    /**
     * Get the length of the series *so far* (up to current index)
     * Note: This mimics the behavior where future data isn't "visible" yet
     */
    get length(): number;
    /**
     * Returns the underlying raw data array.
     * Useful for performance-critical bulk operations that understand the indexing.
     */
    get data(): T[];
    /**
     * Creates a copy of the visible series as a reversed array (Pine Script standard format for bulk ops).
     * Warning: This is O(N) and should be used sparingly.
     */
    toArray(): T[];
    /**
     * Push a value to the underlying array.
     * Used when constructing user-defined series dynamically.
     */
    push(value: T): number;
    /**
     * Update the underlying array reference (e.g. for re-assignment)
     */
    replaceData(newData: T[]): void;
}
