type KeyOf = keyof (S & Q); /** * Container for URL query parameters with typed accessors. * Supports initialization from multiple formats (string, array, object, URLSearchParams). * * @template QuerySchema Known query parameter keys and their expected value types. */ export default class IncomingSearchParams = Record> { #private; /** * Read any known query parameter as a string or null. */ getAny: >(key: T) => string | null; /** * Constructs a new IncomingSearchParams instance. * * @param init initial parameters */ constructor(init?: string | string[][] | Record | URLSearchParams); /** * Returns a JSON-like object of parameters, taking the first value for each key. * @returns object mapping each key to its first value. */ json(): QuerySchema; /** * Retrieves the first value for a known parameter or null if missing. * * @param key parameter key to retrieve. * @returns first parameter value or null. */ getKnown(key: T): QuerySchema[T] | null; /** * Retrieves all values for a known parameter key. * * @param key parameter key to retrieve. * @returns array of all values for the key. */ getAll(key: T): string[]; /** * Checks if a known parameter key is present. * * @param key parameter key to check. * @returns true if the key exists. */ has(key: T): boolean; /** * Sets a parameter to a single value, replacing existing values. * * @param key parameter key to set. * @param value value to assign. * @returns instance for chaining. */ set(key: T, value: any): this; /** * Appends a value to a parameter key, preserving existing values. * * @param key parameter key to append to. * @param value value to append. * @returns instance for chaining. */ append(key: T, value: any): this; /** * Deletes all values for a parameter key. * * @param key parameter key to delete. * @returns instance for chaining. */ delete(key: T): this; /** * Returns a simple object of parameters taking the first value for each key. * * @returns plain object of key->firstValue. */ getObject(): Record; /** * Iterator over [key, value] pairs for each parameter value. * Works like URLSearchParams[Symbol.iterator]. */ [Symbol.iterator](): IterableIterator<[string, string]>; } export {};