serve-index/000755 001751 000177 0000000000 14522451650014776 5ustar00runner000000 000000 1452245165014522451650serve-index/LICENSE000644 001751 000177 0000002165 14522451650016007 0ustar00runner000000 000000 1452245165014522451650 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 serve-index/README.md000644 001751 000177 0000003243 14522451650016264 0ustar00runner000000 000000 1452246174414522451650# Installation > `npm install --save @types/serve-index` # Summary This package contains type definitions for serve-index (https://github.com/expressjs/serve-index). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-index. ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-index/index.d.ts) ````ts import { Handler } from "express"; import { Stats } from "fs"; /** Serves pages that contain directory listings for a given path. */ declare function serveIndex(path: string, options?: serveIndex.Options): Handler; declare namespace serveIndex { interface File { name: string; stat: Stats; } interface Locals { directory: string; displayIcons: boolean; fileList: File[]; name: string; stat: Stats; path: string; style: string; viewName: string; } type TemplateCallback = (error: Error | null, htmlString?: string) => void; interface Options { filter?: ((filename: string, index: number, files: File[], dir: string) => boolean) | undefined; hidden?: boolean | undefined; icons?: boolean | undefined; stylesheet?: string | undefined; template?: string | ((locals: Locals, callback: TemplateCallback) => void) | undefined; view?: string | undefined; } } export = serveIndex; ```` ### Additional Details * Last updated: Tue, 07 Nov 2023 15:11:36 GMT * Dependencies: [@types/express](https://npmjs.com/package/@types/express) # Credits These definitions were written by [Tanguy Krotoff](https://github.com/tkrotoff). serve-index/index.d.ts000644 001751 000177 0000002012 14522451650016672 0ustar00runner000000 000000 1452245165014522451650import { Handler } from "express"; import { Stats } from "fs"; /** Serves pages that contain directory listings for a given path. */ declare function serveIndex(path: string, options?: serveIndex.Options): Handler; declare namespace serveIndex { interface File { name: string; stat: Stats; } interface Locals { directory: string; displayIcons: boolean; fileList: File[]; name: string; stat: Stats; path: string; style: string; viewName: string; } type TemplateCallback = (error: Error | null, htmlString?: string) => void; interface Options { filter?: ((filename: string, index: number, files: File[], dir: string) => boolean) | undefined; hidden?: boolean | undefined; icons?: boolean | undefined; stylesheet?: string | undefined; template?: string | ((locals: Locals, callback: TemplateCallback) => void) | undefined; view?: string | undefined; } } export = serveIndex; serve-index/package.json000644 001751 000177 0000001507 14522451650017274 0ustar00runner000000 000000 1452246174414522451650{ "name": "@types/serve-index", "version": "1.9.4", "description": "TypeScript definitions for serve-index", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-index", "license": "MIT", "contributors": [ { "name": "Tanguy Krotoff", "githubUsername": "tkrotoff", "url": "https://github.com/tkrotoff" } ], "main": "", "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/serve-index" }, "scripts": {}, "dependencies": { "@types/express": "*" }, "typesPublisherContentHash": "cef74e00c7096d0fb4a96d2ce78f45585c95b6a83748cffb9b65bd8ff20297b6", "typeScriptVersion": "4.5" }