🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@types/koa-favicon

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/koa-favicon

TypeScript definitions for koa-favicon

ts5.2
ts5.3
ts5.4
ts5.5
ts5.6
ts5.7
ts5.8
ts5.9
ts6.0
latest
Source
npmnpm
Version
2.1.4
Version published
Maintainers
1
Created
Source

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

Credits

These definitions were written by Jerry Chin.

FAQs

Package last updated on 24 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts