import { PDFObject } from './pdf-object.ts'; import type { PDFWriter } from './pdf-writer.ts'; /** * Represents a PDF dictionary object, which is a collection of * key-value pairs. */ export declare class PDFDict extends PDFObject { private readonly entries; /** * Creates a PDFDict from a given object mapping strings to PDFObjects * or primitive values. Undefined values are skipped. */ static of(object: Record): PDFDict; /** * Creates an empty PDFDict. */ constructor(); [Symbol.iterator](): Iterator<[string, PDFObject]>; /** * Returns an array of the dictionary's keys. */ keys(): string[]; /** * Sets a key-value pair in the dictionary. */ set(name: string, value: PDFObject | string | number | boolean | null): void; /** * Gets the value for a given key in the dictionary, or `undefined` if * the key does not exist. */ get(name: string): PDFObject | undefined; /** * Updates the value for a given key using the provided updater function. * If the updater returns a different value, the dictionary is updated. * Returns the updated value. */ update(name: string, updater: (prev: PDFObject | undefined) => PDFObject): PDFObject; /** * Returns the number of entries in the dictionary. */ size(): number; /** * Writes the PDF dictionary to the given PDFWriter. */ write(writer: PDFWriter): void; }