import type { ReplayRecordingData } from '@sentry/types'; import type { AddEventResult, EventBuffer, EventBufferType, RecordingEvent } from '../types'; /** * Event buffer that uses a web worker to compress events. * Exported only for testing. */ export declare class EventBufferCompressionWorker implements EventBuffer { private _worker; private _earliestTimestamp; constructor(worker: Worker); /** @inheritdoc */ get hasEvents(): boolean; /** @inheritdoc */ get type(): EventBufferType; /** * Ensure the worker is ready (or not). * This will either resolve when the worker is ready, or reject if an error occured. */ ensureReady(): Promise; /** * Destroy the event buffer. */ destroy(): void; /** * Add an event to the event buffer. * * Returns true if event was successfuly received and processed by worker. */ addEvent(event: RecordingEvent): Promise; /** * Finish the event buffer and return the compressed data. */ finish(): Promise; /** @inheritdoc */ clear(): void; /** @inheritdoc */ getEarliestTimestamp(): number | null; /** * Send the event to the worker. */ private _sendEventToWorker; /** * Finish the request and return the compressed data from the worker. */ private _finishRequest; } //# sourceMappingURL=EventBufferCompressionWorker.d.ts.map