import { Serializable, toDeserialized, toSerialized } from "./shared.js";
export type Proxyable = Record<string | symbol, any> | any[];
declare class SharedJsonBufferImpl<T extends Proxyable> extends Serializable {
    u32: Uint32Array;
    f64: Float64Array;
    u8: Uint8Array;
    private buffer;
    private textDecoder;
    private textEncoder;
    private stringCache;
    private proxyCache;
    private propertyHints;
    private activeTargets;
    private registry;
    private tempRoots;
    scratchPtr: number;
    scratchCap: number;
    scratchLen: number;
    scratchStart: number;
    constructor(initial: T, options?: {
        size?: number;
    });
    constructor(initial: T, buffer: SharedArrayBuffer);
    private initViews;
    private initializeBuffer;
    private getRootProxy;
    private alloc;
    private collectGarbage;
    resolvePtr(ptr: number): void;
    private readString;
    readSlot(offset: number): any;
    private writeValue;
    private allocObject;
    private allocArray;
    private writeInitial;
    objectHandler: ProxyHandler<any>;
    private getProxyForPtr;
    toConsoleView(ptr: number, depth?: number): any;
    toJSON(ptr: number): any;
    private objectDelete;
    private objectSet;
    private arrayEnsureCapacity;
    private arraySpliceImpl;
    /**
     * Helper to create a shallow JS Array containing Proxies or primitives
     * derived from the underlying buffer.
     */
    private toArrayShallow;
    private arrayHandler;
    private arraySet;
    [toSerialized](): readonly [SharedArrayBuffer, any, 7];
    static [toDeserialized](data: ReturnType<SharedJsonBufferImpl<any>[typeof toSerialized]>[0]): SharedJsonBufferImpl<any>;
}
export declare const SharedJsonBuffer: {
    new <T extends Proxyable>(initial: T, options?: {
        size?: number;
    }): SharedJsonBufferImpl<T> & T;
    new <T extends Proxyable>(initial: T, buffer: SharedArrayBuffer): SharedJsonBufferImpl<T> & T;
    [toDeserialized](data: any): any;
};
export type SharedJsonBuffer<T extends Proxyable> = SharedJsonBufferImpl<T> & T;
export {};
