Skip to content

Commit

Permalink
types: add CokieOptions Type
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mdy-m committed Aug 20, 2024
1 parent d84bb01 commit d2ca876
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions lib/types/http.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { IncomingMessage, ServerResponse } from 'http';
declare module 'http' {
interface IncomingMessage {
json(): Promise<object | undefined>;
get(header: string): string | undefined;
path(): string;
hostname(): string;
protocol(): 'http' | 'https';
}

interface ServerResponse {
Expand All @@ -16,14 +12,13 @@ declare module 'http' {
redirect(url: string, statusCode?: number): void;
render(view: string, options?: object): void;
}
}

interface CookieOptions {
expires?: Date;
maxAge?: number;
domain?: string;
path?: string;
secure?: boolean;
httpOnly?: boolean;
sameSite?: 'strict' | 'lax' | 'none';
interface CookieOptions {
expires?: Date;
maxAge?: number;
domain?: string;
path?: string;
secure?: boolean;
httpOnly?: boolean;
sameSite?: 'strict' | 'lax' | 'none';
}
}

0 comments on commit d2ca876

Please sign in to comment.