import type { Hash } from '../hash.ts'; import type { Release } from '../with-transactions.ts'; import type { Chunk, Refs } from './chunk.ts'; export interface Store { read(): Promise; write(): Promise; close(): Promise; } interface GetChunk { getChunk(hash: Hash): Promise; } export interface MustGetChunk { mustGetChunk(hash: Hash): Promise; } export interface Read extends GetChunk, MustGetChunk, Release { hasChunk(hash: Hash): Promise; getHead(name: string): Promise; get closed(): boolean; } export interface Write extends Read { createChunk(data: V, refs: Refs): Chunk; putChunk(c: Chunk): Promise; setHead(name: string, hash: Hash): Promise; removeHead(name: string): Promise; assertValidHash(hash: Hash): void; commit(): Promise; } export declare class ChunkNotFoundError extends Error { name: string; readonly hash: Hash; constructor(hash: Hash); } export declare function mustGetChunk(store: GetChunk, hash: Hash): Promise; export declare function mustGetHeadHash(name: string, store: Read): Promise; export {}; //# sourceMappingURL=store.d.ts.map