@types/koa-favicon
TypeScript icon, indicating that this package has built-in type declarations

2.1.3 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/koa-favicon

Weekly Downloads

8,242

Version

2.1.3

License

MIT

Unpacked Size

4.05 kB

Total Files

5

Last publish

Collaborators

  • types