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
/* =================== USAGE ===================
import favicon = require("koa-favicon");
var Koa = require('koa');
var app = new Koa();
app.use(favicon(__dirname + '/public/favicon.ico'));
=============================================== */
import * as Koa from "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: Tue, 07 Nov 2023 09:09:38 GMT
- Dependencies: @types/koa
Credits
These definitions were written by Jerry Chin.