// Structural declaration of the '@bytecask/worker' surface consumed by the // OPFS adapter. Kept as an ambient module (not an import of the package's // built types) so `tsc --noEmit` never depends on the worker's build output; // the real contract is proven end-to-end by the headless-browser suite. declare module '@bytecask/worker' { export interface OpfsIoOptions { rootDir?: string; workerFactory?: () => Worker; workerUrl?: string | URL; } export interface OpfsIo { write(hash: string, bytes: Uint8Array): Promise; read(hash: string): Promise; exists(hash: string): Promise; remove(hash: string): Promise; listKeys(): Promise; totalBytes(): Promise; writeStream(hash: string, chunks: AsyncIterable): Promise; dispose(): Promise; } export function spawnBlobWorker(options?: { workerFactory?: () => Worker; workerUrl?: string | URL; }): Worker; export function createOpfsIo(options?: OpfsIoOptions): Promise; }