UNPKG

declarations

Version:

[![npm version](https://badge.fury.io/js/declarations.svg)](https://www.npmjs.com/package/declarations)

29 lines (24 loc) 758 B
// Type definitions for cookie v0.1.2 // Project: https://github.com/jshttp/cookie // Definitions by: Pine Mizune <https://github.com/pine613> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped interface CookieSerializeOptions { encode?: (val: string) => string; path?: string; expires?: Date; maxAge?: number; domain?: string; secure?: boolean; httpOnly?: boolean; } interface CookieParseOptions { decode?: (val: string) => string; } interface CookieStatic { serialize(name: string, val: string, options?: CookieSerializeOptions): string; parse(str: string, options?: CookieParseOptions): { [key: string]: string }; } declare module "cookie" { var cookie: CookieStatic; export = cookie; }