/// import { RouterContext } from '@koa/router'; import { InputBag as InputBagContract } from '@supercharge/contracts'; export declare class ResponseHeaderBag implements InputBagContract { /** * Stores the request headers as an object. */ private readonly ctx; /** * Create a new instance. */ constructor(ctx: RouterContext); /** * Returns the properties object of this input bag. */ toJSON(): ResponseHeaders; /** * Returns all properties within this input bag or an object with all `keys` that exist in the bag. */ all(): ResponseHeaders; all>(): R; all(...keys: Key[] | Key[][]): Partial>; /** * Returns the input value for the given `key`. Returns `undefined` * if the given `key` does not exist in the input bag. */ get(key: Key): ResponseHeaders[Key]; get(key: Key, defaultValue: Value): ResponseHeaders[Key] | Value; get(key: string, defaultValue: Value): Value | undefined; /** * Set an input for the given `key` and assign the `value`. This * overrides a possibly existing input with the same `key`. */ set(key: Key, value: ResponseHeaders[Key]): this; set(values: Partial): this; set(key: Key | Partial, value?: any): this; /** * Merge the given `data` object with the existing input bag. */ merge(data: Partial): this; /** * Determine whether the given `input` is an object. */ protected isObject(input: any): input is Record; /** * Determine whether the input bag contains an item for the given `key`, * independently from the key’s assigned value. If you need to ensure * that a value is not `undefined`, use the related `has` method. */ exists(key: Key): boolean; /** * Determine whether an item with the given `key` exists in the input bag * and the assigned value is not `undefined`. The assigned value could * also be `null`. Empty states should explcitely use `undefinied`. */ has(key: Key): boolean; /** * Determine whether the input bag is missing a value for the given `key`. */ isMissing(key: Key): boolean; /** * Remove the input bag item for the given `key`. */ remove(key: Key): this; /** * Removes all data from the input bag. */ clear(): this; }