Skip to content

SvelteKitCookies

The subset of SvelteKit’s Cookies API this adapter depends on. Kept structural so it works against the real type without importing kit at runtime (the adapter ships in a browser/edge bundle too).

delete(name, opts?): void

Parameter Type
name string
opts? { path?: string; }
opts.path? string

void


get(name): string | undefined

Parameter Type
name string

string | undefined


set(name, value, opts?): void

Parameter Type
name string
value string
opts? { expires?: Date; httpOnly?: boolean; maxAge?: number; path?: string; sameSite?: "lax" | "strict" | "none"; secure?: boolean; }
opts.expires? Date
opts.httpOnly? boolean
opts.maxAge? number
opts.path? string
opts.sameSite? "lax" | "strict" | "none"
opts.secure? boolean

void