DefinitelyTyped/types/restify-cookies/index.d.ts
2020-08-26 12:16:32 -04:00

31 lines
788 B
TypeScript

// Type definitions for restify-cookies 0.2
// Project: https://github.com/nathschmidt/restify-cookies
// Definitions by: weekens <https://github.com/weekens>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
import * as restify from 'restify';
declare module 'restify' {
interface CookieOptions {
encode?: (input: string) => string; // tslint:disable-line:prefer-method-signature
maxAge?: number;
domain?: string;
path?: string;
expires?: Date;
httpOnly?: boolean;
secure?: boolean;
sameSite?: boolean|'lax'|'strict'|'none';
}
interface Request {
cookies: any;
}
interface Response {
setCookie(key: string, val: string, options?: CookieOptions): void;
}
}
export function parse(): any;