import { IncomingHttpHeaders } from 'node:http'; type RawHeaders = readonly string[]; type Dict = NodeJS.Dict; type KeyOf = keyof (H & S); export default class IncomingHeaders = Record, H extends Dict = IncomingHttpHeaders> { #private; constructor(raw?: RawHeaders | Dict); /** * Gets the link associated with the current map instance. * * @return link to the internal map. */ get link(): Record; /** * Retrieves all stored cookies as key-value pairs. * * @return {Record} an object containing cookie names as keys and their corresponding values. */ get cookies(): Record; /** * Retrieves the value of a cookie by its name. * * @param {string} name name of the cookie to retrieve. * @return {string | undefined} value of the cookie if found, or undefined if the cookie does not exist. */ getCookie(name: string): string | undefined; /** * Returns an iterator for traversing the key-value pair entries stored in the internal map. * Each key-value pair is returned as a two-element array. * * @return {IterableIterator<[string, string]>} an iterator that yields key-value pairs as arrays. */ entries(): IterableIterator<[string, string]>; /** * Returns a JSON-like object of parameters, taking the first value for each key. * @returns object mapping each key to its first value. */ json(): Schema; /** * Checks if a given key exists in the internal map. * * @param name key to check for existence. It can either be a specific type parameter of `Schema` or any string. * @return {boolean} true if the key exists in the map, otherwise false. */ has>(name: T | string): boolean; /** * Retrieves the first value associated with a given key. * * @param name key whose associated value needs to be retrieved. * @return {string | null} first value associated with the specified key if it exists, otherwise returns null. */ get>(name: T): string | null; /** * Retrieves all values associated with the specified key from the internal map. * * @param name key whose associated values are to be retrieved. * @return {string[]} array of strings containing the values associated with the specified key. * Returns an empty array if no values are found. */ getAll>(name: T): string[]; /** * Sets or replaces the header with the given name and value. * * @param name header name (typed if using a Schema). * @param value header value. * @returns instance for chaining. */ set>(name: T, value: string): this; /** * Appends a value to an existing header or creates it if absent. * * @param name header name. * @param value value to append. * @returns instance for chaining. */ append>(name: T, value: string): this; /** * Deletes a header by name. * * @param name header name to delete. * @returns instance for chaining. */ delete>(name: T): this; } export {};