import { type SyncStorageWithOptions } from "./index.js"; export type CookieOptions = (CookieProperties & { getRequestHeaders?: () => Headers; getResponseHeaders?: () => Headers; }) | undefined; type CookiePropertyTypes = { domain?: string; expires?: Date | number | String; path?: string; secure?: boolean; httpOnly?: boolean; maxAge?: number; sameSite?: "None" | "Lax" | "Strict"; }; type CookieProperties = { [key in keyof CookiePropertyTypes]: CookiePropertyTypes[key]; }; /** * handle cookies exactly like you would handle localStorage * * the main change is that setItem accepts the following options: * ```typescript * export type CookieOptions = { * domain?: string; * expires?: Date | number | String; * path?: string; * secure?: boolean; * httpOnly?: boolean; * maxAge?: number; * sameSite?: "None" | "Lax" | "Strict"; * getRequest?: () => Request | () => PageEvent // useRequest from solid-start, vite users must pass the "useRequest" from "solid-start/server" function manually * setCookie?: (key, value, options) => void // set cookie on the server * }; * ``` * Also, you can use its _read and _write properties to change reading and writing */ export declare const cookieStorage: SyncStorageWithOptions; export {};