export type ObjectType = 'blob' | 'tree' | 'commit' | 'tag'; export type GitObject = { readonly type: ObjectType; readonly body: Uint8Array; }; export declare const TYPES: readonly ObjectType[]; export declare const EMPTY_TREE = "4b825dc642cb6eb9a060e54bf8d69288fbee4904"; export declare const text: (bytes: Uint8Array) => string; export declare const sha1: (bytes: Uint8Array) => Promise; export declare const isId: (value: unknown) => value is string; export declare const loose: (o: GitObject) => Uint8Array; export declare const idOf: (o: GitObject) => Promise; export declare const readLoose: (bytes: Uint8Array) => GitObject; export declare const deflated: (o: GitObject) => Promise; export declare const inflated: (bytes: Uint8Array) => Promise; export declare const blob: (source: string) => GitObject; export declare const FILE = "100644"; export declare const DIRECTORY = "40000"; export type TreeEntry = { readonly mode: string; readonly name: string; readonly id: string; }; export declare const tree: (entries: readonly TreeEntry[]) => GitObject; export declare const readTree: (o: GitObject) => TreeEntry[]; export type Signature = { readonly name: string; readonly email: string; readonly seconds: number; readonly zone: string; }; export type Commit = { readonly tree: string; readonly parents: readonly string[]; readonly author: Signature; readonly committer: Signature; readonly message: string; }; export declare const commit: (c: Commit) => GitObject; export declare const readCommit: (o: GitObject) => Commit;