import { DynamicBuffer } from '@platformatic/dynamic-buffer'; import { type NullableString } from './definitions.ts'; export type ChildrenWriter = (w: Writer) => void; export type EntryWriter = (writer: Writer, entry: InputType, index: number) => void; declare const instanceIdentifier: unique symbol; export declare class Writer { #private; context: Record; [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(value: InputType[] | null | undefined, entryWriter: EntryWriter, compact?: boolean, appendTrailingTaggedFields?: boolean): this; appendMap(value: Map | null | undefined, entryWriter: EntryWriter<[Key, Value]>, compact?: boolean, appendTrailingTaggedFields?: boolean): this; appendVarIntArray(value: InputType[] | null | undefined, entryWriter: EntryWriter): this; appendVarIntMap(value: Map | null | undefined, entryWriter: EntryWriter<[Key, Value]>): this; appendTaggedFields(_?: any[]): this; prependLength(): this; prependVarIntLength(): this; } export {};