UNPKG

@dazejs/framework

Version:

Daze.js - A powerful web framework for Node.js

32 lines (31 loc) 887 B
import { Application } from '../../foundation/application'; export interface CookieOptions { maxAge?: number; expires?: number; path?: string; signed?: boolean; domain?: string; httpOnly?: boolean; overwrite?: boolean; secure?: boolean; } export declare class Cookie { app: Application; name: string; value: string; options: CookieOptions; constructor(name: string, value: string, options?: CookieOptions); getOptions(): CookieOptions; getName(): string; getValue(): string; setValue(val: string): this; setHttpOnly(flag?: boolean): this; setSigned(flag?: boolean): this; shouldSigned(): this; doNotSigned(): this; setMaxAge(expiry?: number): this; setDomain(pattern?: string): this; setPath(uri?: string): this; setSecure(flag?: boolean): this; setExpires(expires: number): this; }