• Version 1.7.30
  • Published
  • 3.6 kB
  • 1 dependency
  • MIT license


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


TypeScript definitions for serve-index



function serveIndex

serveIndex: (path: string, options?: serveIndex.Options) => any;


    interface File

    interface File {}

      property name

      name: string;

        property stat

        stat: fs.Stats;

          interface Locals

          interface Locals {}

            property directory

            directory: string;

              property displayIcons

              displayIcons: boolean;

                property fileList

                fileList: Array<File>;

                  property name

                  name: string;

                    property path

                    path: string;

                      property stat

                      stat: fs.Stats;

                        property style

                        style: string;

                          property viewName

                          viewName: string;

                            interface Options

                            interface Options {}

                              property filter

                              filter?: (
                              filename: string,
                              index: number,
                              files: Array<File>,
                              dir: string
                              ) => boolean;

                                property hidden

                                hidden?: boolean;

                                  property icons

                                  icons?: boolean;

                                    property stylesheet

                                    stylesheet?: string;

                                      property template

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

                                        property view

                                        view?: string;

                                          Type Aliases

                                          type templateCallback

                                          type templateCallback = (error: Error, htmlString?: string) => void;

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

                                            • Markdown
                                            • 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>