export interface MetadataHandle, Content extends Record> { readContent(): Promise>; readMetaData(): Promise>; close(): Promise; } export declare enum MetadataReadErrorType { INVALID_METADATA_SIZE = "INVALID_METADATA_SIZE", INVALID_METADATA = "INVALID_METADATA", INVALID_CONTENT_SIZE = "INVALID_CONTENT_SIZE", INVALID_CONTENT = "INVALID_CONTENT" } export type MetadataReadResult> = { ok: true; content: Content; error: null; errorType: null; } | { ok: false; content: null; error: Error; errorType: MetadataReadErrorType; }; export declare class Metadata { static HEADER_SIZE: number; private static success; private static error; static read, Content extends Record>(src: string): Promise>; static write, Content extends Record>(src: string, metadata: Metadata, content: Content): Promise; private static readMetaData; private static readContent; private static getMetadataSize; private static writeData; }