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

4.0.4 • Public • Published

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

/* =================== 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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
4.0.435,574ts5.7
4.0.435,574ts5.6
4.0.435,574latest
4.0.435,574ts4.5
4.0.435,574ts4.6
4.0.435,574ts4.7
4.0.435,574ts4.8
4.0.435,574ts4.9
4.0.435,574ts5.0
4.0.435,574ts5.1
4.0.435,574ts5.2
4.0.435,574ts5.3
4.0.435,574ts5.4
4.0.435,574ts5.5
4.0.435,574ts5.8
4.0.114,516ts2.3
4.0.114,516ts2.4
4.0.114,516ts2.5
4.0.114,516ts2.6
4.0.114,516ts2.7
4.0.114,516ts2.8
4.0.114,516ts2.9
4.0.114,516ts3.0
4.0.114,516ts3.1
4.0.114,516ts3.2
4.0.114,516ts3.3
4.0.114,516ts3.4
4.0.114,516ts3.5
4.0.211,932ts3.6
4.0.211,932ts3.7
4.0.211,932ts3.8
4.0.211,932ts3.9
4.0.211,932ts4.0
4.0.211,932ts4.1
4.0.211,932ts4.2
4.0.211,932ts4.3
4.0.211,932ts4.4
3.0.12ts2.0
3.0.12ts2.1
3.0.12ts2.2

Version History

VersionDownloads (Last 7 Days)Published
4.0.435,574
4.0.3752
4.0.211,932
4.0.114,516
4.0.0138
3.0.29
3.0.12
3.0.01
2.0.2232
2.0.211
2.0.201
2.0.191
2.0.181
2.0.17-alpha1
2.0.16-alpha1
2.0.15-alpha1
2.0.14-alpha1
2.0.13-alpha1
2.0.12-alpha1
2.0.11-alpha1
2.0.6-alpha1
2.0.5-alpha1

Package Sidebar

Install

npm i @types/koa-static

Weekly Downloads

62,969

Version

4.0.4

License

MIT

Unpacked Size

4.13 kB

Total Files

5

Last publish

Collaborators

  • types