import { type HttpResponseParts, TO_HTTP_RESPONSE_PARTS, type ToHttpResponseParts } from "./to-response-parts.js"; /** * Represents a unique identifier for an extension, defined by a symbol. * * The `ExtensionKey` class provides a way to create and manage keys for * extensions that are associated with a specific type, ensuring type safety and * uniqueness. * * @example * ```ts * import { ExtensionKey } from "taxum/core/http"; * * type MyExtensionValue = { foo: string }; * const MY_EXTENSION = new ExtensionKey("My extension"); * ``` */ export declare class ExtensionKey { private readonly _type; private readonly description; constructor(description: string); toJSON(): string; } /** * A map for setting and retrieving extensions. * * The accessors use {@link ExtensionKey}s to guarantee type-safety with the * associated values. */ export declare class Extensions implements ToHttpResponseParts { private readonly map; /** * Inserts a value into the map associated with a specific key. */ insert(key: ExtensionKey, value: T): void; /** * Retrieves the value associated with the specified key from the map. */ get(key: ExtensionKey): T | undefined; /** * Removes a value associated with the specified key from the map. */ remove(key: ExtensionKey): void; /** * Determines whether the specified key exists in the map. */ has(key: ExtensionKey): boolean; /** * Clears all key-value pairs from the map. */ clear(): void; /** * Checks whether the map is empty. */ isEmpty(): boolean; /** * Retrieves the size of the map. */ len(): number; /** * Extends the current instance with entries from another instance. */ extend(other: Extensions): this; [TO_HTTP_RESPONSE_PARTS](res: HttpResponseParts): void; toJSON(): Record; }