import type { CookieItem, CookieOptions, CookieTarget } from '../definitions/interfaces.js'; import type { KeyOf } from '../definitions/types.js'; type Clear = (options?: U) => ClearReturn; type ClearReturn = void | Error | Promise; type CopyReturn = void | Error | Promise; type Get = (key: string, options?: U) => GetReturn; type GetReturn = T | Error | Promise; type Has = (key: string, options?: U) => HasReturn; type HasReturn = boolean | Error | Promise; type Remove = (key: string, keys?: KeyOf.Shallow[], options?: U) => RemoveReturn; type RemoveReturn = void | Error | Promise; type Set = (key: string, item: T, options?: U) => SetReturn; type SetReturn = void | Error | Promise; export declare class Cookie { /** * The cookie instance name. */ protected readonly name: string; /** * The cookie options. */ protected options?: Options; protected readonly _clear: Clear; protected readonly _get: Get; protected readonly _has: Has; protected readonly _remove: Remove; protected readonly _set: Set; constructor(name: string, clear: Clear, get: Get, has: Has, remove: Remove, set: Set, options?: Options); protected clear_(cleared: void | Error): void | Error; clear(options?: unknown): ClearReturn; protected get_(key: string, item: T | Error): T | Error; get(key: string, options?: unknown): GetReturn; protected remove_(key: string, removed: void | Error): void | Error; remove(key: string, keys?: KeyOf.Shallow[], options?: unknown): RemoveReturn; protected set_(key: string, item: T | Error, set: void | Error): void | Error; protected set__(item: T, keys: KeyOf.Deep[], current: T | Error): T | Error; set(key: string, item: T, keys?: KeyOf.Deep[], options?: unknown): SetReturn; protected copy_(key: string, target: T2, keys: KeyOf.Deep[] | undefined, item: T1 | Error): void | Error; copy(key: string, target: T2, keys?: KeyOf.Deep[], options?: unknown): CopyReturn; protected has_(keys: KeyOf.Deep[] | undefined, item: T | Error): boolean; has(key: string, keys?: KeyOf.Deep[], options?: unknown): HasReturn; /** * Returns the name of the instance. */ getName(): string; /** * Returns the separator used to separate the cookie name from the cookie item key. */ getSeparator(): string; /** * Returns the options for the cookie. */ getOptions(): Options | undefined; /** * Sets the options for the cookie. */ setOptions(options: Options): void; } export {};