Files
SnowLuma/.pnpm-store/v11/files/dc/c0a1f4e327db2c36db3779745ff0a8ca15c72afdeaf3b192a0a7dc55cddad14885cae3120c0fb0da75162d909ddcff496d29c7ed8074daf73a57adb8ff5333
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

23 lines
1.4 KiB
Plaintext

import { Context } from "../../context.js";
import { Cookie, CookieOptions, CookiePrefixOptions, SignedCookie } from "../../utils/cookie.js";
//#region src/helper/cookie/index.d.ts
interface GetCookie {
(c: Context, key: string): string | undefined;
(c: Context): Cookie;
(c: Context, key: string, prefixOptions?: CookiePrefixOptions): string | undefined;
}
interface GetSignedCookie {
(c: Context, secret: string | BufferSource, key: string): Promise<string | undefined | false>;
(c: Context, secret: string | BufferSource): Promise<SignedCookie>;
(c: Context, secret: string | BufferSource, key: string, prefixOptions?: CookiePrefixOptions): Promise<string | undefined | false>;
}
export declare const getCookie: GetCookie;
export declare const getSignedCookie: GetSignedCookie;
export declare const generateCookie: (name: string, value: string, opt?: CookieOptions) => string;
export declare const setCookie: (c: Context, name: string, value: string, opt?: CookieOptions) => void;
export declare const generateSignedCookie: (name: string, value: string, secret: string | BufferSource, opt?: CookieOptions) => Promise<string>;
export declare const setSignedCookie: (c: Context, name: string, value: string, secret: string | BufferSource, opt?: CookieOptions) => Promise<void>;
export declare const deleteCookie: (c: Context, name: string, opt?: CookieOptions) => string | undefined;
//#endregion
export {};