Skip to content

Commit

Permalink
Fix AstroCookieSetOptions IDE annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
fshafiee committed Apr 8, 2024
1 parent 7696bbb commit 6035992
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions packages/astro/src/core/cookies/cookies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@ import type { CookieSerializeOptions } from 'cookie';
import { parse, serialize } from 'cookie';
import { AstroError, AstroErrorData } from '../errors/index.js';

export interface AstroCookieSetOptions {
domain?: string;
expires?: Date;
httpOnly?: boolean;
maxAge?: number;
path?: string;
sameSite?: boolean | 'lax' | 'none' | 'strict';
secure?: boolean;
encode?: (value: string) => string;
}
export type AstroCookieSetOptions = Pick<
CookieSerializeOptions,
'domain' | 'path' | 'expires' | 'maxAge' | 'httpOnly' | 'sameSite' | 'secure' | 'encode'
>;

export interface AstroCookieGetOptions {
decode?: (value: string) => string;
Expand Down

0 comments on commit 6035992

Please sign in to comment.