• Version 1.4.6
  • Published
  • 5.38 kB
  • 1 dependency
  • MIT license


npm i @types/cookie-parser
yarn add @types/cookie-parser
pnpm add @types/cookie-parser


TypeScript definitions for cookie-parser



function cookieParser

cookieParser: typeof cookieParser;

    function JSONCookie

    JSONCookie: (jsonCookie: string) => object | undefined;

      function JSONCookies

      JSONCookies: <T extends { [key: string]: string }>(
      jsonCookies: T
      ) => { [P in keyof T]: object };

        function signedCookie

        signedCookie: (cookie: string, secret: string | string[]) => string | false;

          function signedCookies

          signedCookies: <T extends { [key: string]: string }>(
          cookies: T,
          secret: string | string[]
          ) => { [P in keyof T]?: string | false };


            interface CookieParseOptions

            interface CookieParseOptions {}

              method decode

              decode: (val: string) => string;


                namespace global

                namespace global {}

                  namespace global.Express

                  namespace global.Express {}

                    interface Request

                    interface Request {}

                      property secret

                      secret?: string;
                      • This request's secret. Optionally set by cookie-parser if secret(s) are provided. Can be used by other middleware. [Declaration merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html) can be used to add your own properties.

                      Package Files (1)

                      Dependencies (1)

                      Dev Dependencies (0)

                      No dev dependencies.

                      Peer Dependencies (0)

                      No peer dependencies.


                      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/cookie-parser.

                      • Markdown
                      • HTML
                        <a href="https://www.jsdocs.io/package/@types/cookie-parser"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>