1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | import * as express from 'express';
|
9 |
|
10 | declare function cookieParser(secret?: string | string[], options?: cookieParser.CookieParseOptions): express.RequestHandler;
|
11 |
|
12 | declare namespace cookieParser {
|
13 | interface CookieParseOptions {
|
14 | decode?(val: string): string;
|
15 | }
|
16 |
|
17 | function JSONCookie(jsonCookie: string): object | undefined;
|
18 |
|
19 | function JSONCookies<T extends { [key: string]: string }>(jsonCookies: T): { [P in keyof T]: object | undefined };
|
20 |
|
21 | function signedCookie(cookie: string, secret: string | string[]): string | false;
|
22 |
|
23 | function signedCookies<T extends { [key: string]: string }>(cookies: T, secret: string | string[]): { [P in keyof T]?: string | false};
|
24 | }
|
25 |
|
26 | export = cookieParser;
|