UNPKG

@hazae41/kdbx

Version:

Rust-like KeePass (KDBX 4) file format for TypeScript

21 lines (20 loc) 826 B
import type { Struct } from "../struct/mod.ts"; import { type Readable, Unknown } from "@hazae41/binary"; import type { Cursor } from "@hazae41/cursor"; export declare class TLV<T extends number = number, V extends Struct = Struct> { readonly type: T; readonly value: V; constructor(type: T, value: V); sizeOrThrow(): number; writeOrThrow(cursor: Cursor<ArrayBuffer>): void; cloneOrThrow(): TLV<T, V>; readIntoOrThrow<W extends Struct>(this: TLV<T, Unknown<ArrayBuffer>>, readable: Readable<W>): TLV<T, W>; } export declare namespace TLV { namespace Empty { const type = 0; function sizeOrThrow(): number; function writeOrThrow(cursor: Cursor<ArrayBuffer>): void; } function readOrThrow(cursor: Cursor<ArrayBuffer>): TLV<number, Unknown<ArrayBuffer, number>>; }