1 | /* =================== USAGE ===================
|
2 |
|
3 | import serve = require("koa-static");
|
4 | var Koa = require('koa');
|
5 |
|
6 | var app = new Koa();
|
7 | app.use(serve("."));
|
8 |
|
9 | =============================================== */
|
10 |
|
11 | import { Middleware } from "koa";
|
12 |
|
13 | import { SendOptions } from "koa-send";
|
14 |
|
15 | declare function serve(root: string, opts?: serve.Options): Middleware<{}>;
|
16 |
|
17 | declare namespace serve {
|
18 | interface Options extends SendOptions {
|
19 | /** If true, serves after return next(), allowing any downstream middleware to respond first. */
|
20 | defer?: boolean | undefined;
|
21 | }
|
22 | }
|
23 |
|
24 | export = serve;
|