cookie-parser/000755 001751 001751 0000000000 15076575141015334 5ustar00runner000000 000000 1507657514115076575141cookie-parser/LICENSE000644 001751 001751 0000002165 15076575141016345 0ustar00runner000000 000000 1507657514115076575141 MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE cookie-parser/README.md000644 001751 001751 0000004240 15076575141016622 0ustar00runner000000 000000 1507657557115076575141# Installation > `npm install --save @types/cookie-parser` # Summary This package contains type definitions for cookie-parser (https://github.com/expressjs/cookie-parser). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cookie-parser. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cookie-parser/index.d.ts) ````ts import express = require("express"); declare module "express" { // Inject additional properties on express.Request interface Request { /** * 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. */ secret?: string | undefined; /** Parsed cookies that have not been signed */ cookies: Record; /** Parsed cookies that have been signed */ signedCookies: Record; } } declare function cookieParser( secret?: string | string[], options?: cookieParser.CookieParseOptions, ): express.RequestHandler; declare namespace cookieParser { interface CookieParseOptions { decode?(val: string): string; } function JSONCookie(jsonCookie: string): object | undefined; function JSONCookies(jsonCookies: T): { [P in keyof T]: object | undefined }; function signedCookie(cookie: string, secret: string | string[]): string | false; function signedCookies( cookies: T, secret: string | string[], ): { [P in keyof T]?: string | false }; } export = cookieParser; ```` ### Additional Details * Last updated: Fri, 24 Oct 2025 04:02:41 GMT * Dependencies: none * Peer dependencies: [@types/express](https://npmjs.com/package/@types/express) # Credits These definitions were written by [Santi Albo](https://github.com/santialbo), [BendingBender](https://github.com/BendingBender), and [Sebastian Beltran](https://github.com/bjohansebas). cookie-parser/index.d.ts000644 001751 001751 0000002570 15076575141017241 0ustar00runner000000 000000 1507657514115076575141import express = require("express"); declare module "express" { // Inject additional properties on express.Request interface Request { /** * 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. */ secret?: string | undefined; /** Parsed cookies that have not been signed */ cookies: Record; /** Parsed cookies that have been signed */ signedCookies: Record; } } declare function cookieParser( secret?: string | string[], options?: cookieParser.CookieParseOptions, ): express.RequestHandler; declare namespace cookieParser { interface CookieParseOptions { decode?(val: string): string; } function JSONCookie(jsonCookie: string): object | undefined; function JSONCookies(jsonCookies: T): { [P in keyof T]: object | undefined }; function signedCookie(cookie: string, secret: string | string[]): string | false; function signedCookies( cookies: T, secret: string | string[], ): { [P in keyof T]?: string | false }; } export = cookieParser; cookie-parser/package.json000644 001751 001751 0000002250 15076575141017630 0ustar00runner000000 000000 1507657557115076575141{ "name": "@types/cookie-parser", "version": "1.4.10", "description": "TypeScript definitions for cookie-parser", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cookie-parser", "license": "MIT", "contributors": [ { "name": "Santi Albo", "githubUsername": "santialbo", "url": "https://github.com/santialbo" }, { "name": "BendingBender", "githubUsername": "BendingBender", "url": "https://github.com/BendingBender" }, { "name": "Sebastian Beltran", "githubUsername": "bjohansebas", "url": "https://github.com/bjohansebas" } ], "main": "", "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/cookie-parser" }, "scripts": {}, "dependencies": {}, "peerDependencies": { "@types/express": "*" }, "typesPublisherContentHash": "2084e147e6529a1c84dc4645ec42b321c2b0165db9aac73e158e4bc9950ffe35", "typeScriptVersion": "5.2" }