UNPKG

398 BTypeScriptView Raw
1export interface Attributes {
2 maxage?: number;
3 expires?: Date;
4 samesite?: 'Lax' | 'Strict' | 'None';
5 secure?: boolean;
6 httponly?: boolean;
7 domain?: string;
8 path?: string;
9}
10
11export function parse(cookie: string): Attributes & Record<string, string>;
12export function stringify(name: string, value: string, options: Omit<Attributes, 'expires'> & { expires?: Date | number | string }): string;