import { Field } from "./Field"; import { type PdfDocument } from "../PdfDocument"; import { PdfCollection } from "../PdfCollection"; import { type FieldProperties } from "./Field"; /** * Represents a collection of {@link Field} objects. **/ export declare class FieldCollection extends PdfCollection { get count(): number; getAt(index: number): Field; setAt(index: number, item: Field): void; insert(index: number, item: Field | FieldProperties): void; contains(item: Field): boolean; remove(item: Field): boolean; removeAt(index: number): void; clear(): void; add(item: Field | FieldProperties): void; /** * Gets the {@link Field} object that owns this collection. */ get field(): Field | null; /** * Gets the {@link PdfDocument} object that owns this collection. */ get doc(): PdfDocument; /** * Searches {@link Field} with specified name, search is case sensitive. * * @param name - The field's name. * @returns - Returns found {@link Field} or null if not found. */ findByName(name: string): Field | null; /** * Searches {@link Field} with specified name, search is case sensitive, * throws an exception if a field not found. * * @param name - The field's name. * @returns - Returns found {@link Field}, throws an exception if not found. */ getByName(name: string): Field; }