DefinitelyTyped/types/nodegit/odb.d.ts
2017-06-04 00:45:48 +01:00

20 lines
418 B
TypeScript

import { Oid } from './oid';
import { OdbObject } from './odb-object';
export namespace Odb {
enum STREAM {
RDONLY = 2,
WRONLY = 4,
RW = 6
}
}
export class Odb {
static open(objects_dir: string): Promise<Odb>;
addDiskAlternate(path: string): number;
free(): void;
read(id: Oid): Promise<OdbObject>;
write(data: Buffer, len: number, type: number): Promise<Oid>;
}