# @types/serve-favicon

> TypeScript definitions for serve-favicon

Latest version **2.5.7** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/serve-favicon
pnpm add @types/serve-favicon
yarn add @types/serve-favicon
bun add @types/serve-favicon
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.5.7 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51437 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/serve-favicon
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-favicon
- npm.io page: https://npm.io/package/@types/serve-favicon

## Dependencies (1)

- [@types/express](https://npm.io/package/@types/express.md) *

## Recent versions

- 2.5.7 (latest) — 2023-11-07
- 2.5.4 (ts4.3) — 2023-04-19
- 2.5.3 (ts3.6) — 2021-07-06
- 2.5.2 (ts3.3) — 2020-12-02
- 2.5.1 (ts3.2) — 2020-10-20
- 2.5.0 (ts2.8) — 2019-11-22
- 2.2.31 (ts2.3) — 2019-08-19
- 2.2.30 (ts2.2) — 2017-11-09
- 2.2.29 (ts2.0) — 2017-08-21
- 2.5.6 — 2023-10-18
- 2.5.5 — 2023-09-25
- 2.2.28 — 2016-09-19
- 2.2.27 — 2016-07-14
- 2.2.26-alpha — 2016-07-08
- 2.2.25-alpha — 2016-07-04
- … 7 more at https://npm.io/package/@types/serve-favicon/versions

## README

# Installation
> `npm install --save @types/serve-favicon`

# Summary
This package contains type definitions for serve-favicon (https://github.com/expressjs/serve-favicon).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-favicon.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/serve-favicon/index.d.ts)
````ts
/* =================== USAGE ===================

    import serveFavicon = require('serve-favicon');
    app.use(serveFavicon(__dirname + '/public/favicon.ico'));

 =============================================== */

import express = require("express");

/**
 * Node.js middleware for serving a favicon.
 */
declare function serveFavicon(
    path: string | Buffer,
    options?: serveFavicon.Options,
): express.RequestHandler;

declare namespace serveFavicon {
    interface Options {
        /**
         * The cache-control max-age directive in ms, defaulting to 1 year.
         * This can also be a string accepted by the `ms` module.
         */
        maxAge?: number | string | undefined;
    }
}

export = serveFavicon;

````

### 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 [Uros Smolnik](https://github.com/urossmolnik), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).

---
_Source: https://npm.io/package/@types/serve-favicon · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
