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

    import favicon = require("koa-favicon");
    var Koa = require('koa');

    var app = new Koa();
    app.use(favicon(__dirname + '/public/favicon.ico'));

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

import Koa = require("koa");

/**
 * Returns a middleware serving the favicon found on the given path.
 */
declare function favicon(path: string, options?: {
    /**
     * cache-control max-age directive in ms, defaulting to 1 day.
     */
    maxage?: number | undefined;
    /**
     * MIME type of the file at path, defaulting to image/x-icon.
     */
    mime?: string | undefined;
}): Koa.Middleware;

declare namespace favicon {}
export = favicon;

````

### Additional Details
 * Last updated: Fri, 24 Oct 2025 04:02:41 GMT
 * Dependencies: [@types/koa](https://npmjs.com/package/@types/koa)

# Credits
These definitions were written by [Jerry Chin](https://github.com/hellopao).
