import { CookieSerializeOptions } from "cookie"; import { createPluginObject } from "../type/PluginType"; declare type CookiePair = [string, string] | [string, string, CookieSerializeOptions]; declare class CookieJar { constructor(); /** 保存对应的 Cookie 字符串的 Map */ cookies: Map; /** 创建一个 Cookie 空间 */ createJar(tag: string, base: string): void; toString(tag?: string): string; get(name: string, tag?: string): CookiePair | null | undefined; set(name: string, value: string, options?: CookieSerializeOptions, tag?: string): boolean; remove(name: string, tag: "default"): boolean; } /** 全局的 Cookie 管理 */ export declare const globalCookie: CookieJar; export declare const useCookie: createPluginObject<{ tag?: string; read?: boolean; write?: boolean; }>; export {};