Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
31 lines
696 B
Plaintext
31 lines
696 B
Plaintext
/// <reference types="node" />
|
|
|
|
import type { Headers } from './fetch'
|
|
|
|
export interface Cookie {
|
|
name: string
|
|
value: string
|
|
expires?: Date | number
|
|
maxAge?: number
|
|
domain?: string
|
|
path?: string
|
|
secure?: boolean
|
|
httpOnly?: boolean
|
|
sameSite?: 'Strict' | 'Lax' | 'None'
|
|
unparsed?: string[]
|
|
}
|
|
|
|
export function deleteCookie (
|
|
headers: Headers,
|
|
name: string,
|
|
attributes?: { name?: string, domain?: string }
|
|
): void
|
|
|
|
export function getCookies (headers: Headers): Record<string, string>
|
|
|
|
export function getSetCookies (headers: Headers): Cookie[]
|
|
|
|
export function setCookie (headers: Headers, cookie: Cookie): void
|
|
|
|
export function parseCookie (cookie: string): Cookie | null
|