@types/serve-index

  • Version 1.9.4
  • Published
  • 4.71 kB
  • 1 dependency
  • MIT license

Install

npm i @types/serve-index
yarn add @types/serve-index
pnpm add @types/serve-index

Overview

TypeScript definitions for serve-index

Index

Functions

function serveIndex

serveIndex: (path: string, options?: serveIndex.Options) => Handler;
  • Serves pages that contain directory listings for a given path.

Interfaces

interface File

interface File {}

    property name

    name: string;

      property stat

      stat: Stats;

        interface Locals

        interface Locals {}

          property directory

          directory: string;

            property displayIcons

            displayIcons: boolean;

              property fileList

              fileList: File[];

                property name

                name: string;

                  property path

                  path: string;

                    property stat

                    stat: Stats;

                      property style

                      style: string;

                        property viewName

                        viewName: string;

                          interface Options

                          interface Options {}

                            property filter

                            filter?:
                            | ((filename: string, index: number, files: File[], dir: string) => boolean)
                            | undefined;

                              property hidden

                              hidden?: boolean | undefined;

                                property icons

                                icons?: boolean | undefined;

                                  property stylesheet

                                  stylesheet?: string | undefined;

                                    property template

                                    template?:
                                    | string
                                    | ((locals: Locals, callback: TemplateCallback) => void)
                                    | undefined;

                                      property view

                                      view?: string | undefined;

                                        Type Aliases

                                        type TemplateCallback

                                        type TemplateCallback = (error: Error | null, htmlString?: string) => void;

                                          Package Files (1)

                                          Dependencies (1)

                                          Dev Dependencies (0)

                                          No dev dependencies.

                                          Peer Dependencies (0)

                                          No peer dependencies.

                                          Badge

                                          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/serve-index.

                                          • Markdown
                                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/serve-index)
                                          • HTML
                                            <a href="https://www.jsdocs.io/package/@types/serve-index"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>