Type Alias: CookieSpec โ
CookieSpec:
z.infer
<typeofCookieSpecSchema
>
Defined in: src/types/schemas.ts:197
Type definition for cookie specification Used for specifying which cookie to query
Example โ
typescript
// Basic cookie spec
const spec: CookieSpec = {
name: 'auth',
domain: 'api.example.com'
};
// Use in function parameters
function queryCookie(spec: CookieSpec): Promise<ExportedCookie[]> {
return getCookie(spec);
}
// Array of specs
const specs: CookieSpec[] = [
{ name: 'session', domain: 'app.example.com' },
{ name: 'theme', domain: 'example.com' }
];