forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
koa-favicon.d.ts
35 lines (24 loc) · 915 Bytes
/
koa-favicon.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Type definitions for koa-favicon v2.x
// Project: https://github.com/koajs/favicon
// Definitions by: Jerry Chin <https://github.com/hellopao/>
// Definitions: https://github.com/hellopao/DefinitelyTyped
/* =================== USAGE ===================
import favicon = require("koa-favicon");
var Koa = require('koa');
var app = new Koa();
app.use(favicon(__dirname + '/public/favicon.ico'));
=============================================== */
/// <reference path="../koa/koa.d.ts" />
declare module "koa-favicon" {
import * as Koa from "koa";
/**
* Returns a middleware serving the favicon found on the given path.
*/
function favicon(path: string, options?: {
/**
* cache-control max-age directive in ms, defaulting to 1 day.
*/
maxage?: number;
}): { (ctx: Koa.Context, next?: () => any): any };
export = favicon;
}