4.0.4 • Published 2 years ago

@types/koa-static v4.0.4

Weekly downloads
92,974
License
MIT
Repository
github
Last release
2 years ago

Installation

npm install --save @types/koa-static

Summary

This package contains type definitions for koa-static (https://github.com/koajs/static).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-static.

index.d.ts

// Type definitions for koa-static 4.0
// Project: https://github.com/koajs/static
// Definitions by: Jerry Chin <https://github.com/hellopao>
//                 Tomek Łaziuk <https://github.com/tlaziuk>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

/* =================== USAGE ===================

    import serve = require("koa-static");
    var Koa = require('koa');

    var app = new Koa();
    app.use(serve("."));

 =============================================== */

import { Middleware } from "koa";

import { SendOptions } from "koa-send";

declare function serve(root: string, opts?: serve.Options): Middleware<{}>;

declare namespace serve {
    interface Options extends SendOptions {
        /** If true, serves after return next(), allowing any downstream middleware to respond first. */
        defer?: boolean | undefined;
    }
}

export = serve;

Additional Details

Credits

These definitions were written by Jerry Chin, and Tomek Łaziuk.

4.0.4

2 years ago

4.0.3

2 years ago

4.0.2

4 years ago

4.0.1

6 years ago

4.0.0

8 years ago

3.0.2

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.0.22

9 years ago

2.0.21

9 years ago

2.0.20

9 years ago

2.0.19

9 years ago

2.0.18

9 years ago

2.0.17-alpha

9 years ago

2.0.16-alpha

9 years ago

2.0.15-alpha

9 years ago

2.0.14-alpha

9 years ago

2.0.13-alpha

9 years ago

2.0.12-alpha

9 years ago

2.0.11-alpha

9 years ago

2.0.6-alpha

9 years ago

2.0.5-alpha

9 years ago