import { type NullableString } from './definitions.ts';
import { DynamicBuffer } from './dynamic-buffer.ts';
export type ChildrenWriter = (w: Writer) => void;
export type EntryWriter<InputType> = (writer: Writer, entry: InputType, index: number) => void;
declare const instanceIdentifier: unique symbol;
export declare class Writer {
    #private;
    context: Record<string, any>;
    [instanceIdentifier]: boolean;
    static isWriter(target: any): boolean;
    static create(): Writer;
    constructor(bl?: DynamicBuffer);
    get buffer(): Buffer;
    get buffers(): Buffer[];
    get dynamicBuffer(): DynamicBuffer;
    get length(): number;
    inspect(): string;
    append(buffer: Buffer): this;
    prepend(buffer: Buffer): this;
    appendFrom(buffer: Writer | DynamicBuffer): this;
    prependFrom(buffer: Writer | DynamicBuffer): this;
    appendUnsignedInt8(value: number, append?: boolean): this;
    appendUnsignedInt16(value: number, append?: boolean): this;
    appendUnsignedInt32(value: number, append?: boolean): this;
    appendUnsignedInt64(value: bigint, append?: boolean): this;
    appendUnsignedVarInt(value: number, append?: boolean): this;
    appendUnsignedVarInt64(value: bigint, append?: boolean): this;
    appendInt8(value: number, append?: boolean): this;
    appendInt16(value: number, append?: boolean): this;
    appendInt32(value: number, append?: boolean): this;
    appendInt64(value: bigint, append?: boolean): this;
    appendFloat64(value: number, append?: boolean): this;
    appendVarInt(value: number, append?: boolean): this;
    appendVarInt64(value: bigint, append?: boolean): this;
    appendBoolean(value: boolean): this;
    appendString(value: NullableString, compact?: boolean, encoding?: BufferEncoding): this;
    appendUUID(value: NullableString): this;
    appendBytes(value: Buffer | undefined | null, compact?: boolean): this;
    appendVarIntBytes(value: Buffer | null | undefined): this;
    appendArray<InputType>(value: InputType[] | null | undefined, entryWriter: EntryWriter<InputType>, compact?: boolean, appendTrailingTaggedFields?: boolean): this;
    appendMap<Key, Value>(value: Map<Key, Value> | null | undefined, entryWriter: EntryWriter<[Key, Value]>, compact?: boolean, appendTrailingTaggedFields?: boolean): this;
    appendVarIntArray<InputType>(value: InputType[] | null | undefined, entryWriter: EntryWriter<InputType>): this;
    appendVarIntMap<Key, Value>(value: Map<Key, Value> | null | undefined, entryWriter: EntryWriter<[Key, Value]>): this;
    appendTaggedFields(_?: any[]): this;
    prependLength(): this;
    prependVarIntLength(): this;
}
export {};
