# @types/koa-static

> TypeScript definitions for koa-static

Latest version **4.0.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/koa-static
pnpm add @types/koa-static
yarn add @types/koa-static
bun add @types/koa-static
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.0.4 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51441 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/koa-static
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-static
- npm.io page: https://npm.io/package/@types/koa-static

## Dependencies (2)

- [@types/koa](https://npm.io/package/@types/koa.md) *
- [@types/koa-send](https://npm.io/package/@types/koa-send.md) *

## Recent versions

- 4.0.4 (latest) — 2023-11-07
- 4.0.2 (ts3.6) — 2021-07-06
- 4.0.1 (ts2.3) — 2019-02-12
- 3.0.1 (ts2.0) — 2017-08-21
- 4.0.3 — 2023-10-18
- 4.0.0 — 2017-12-28
- 3.0.2 — 2017-11-09
- 3.0.0 — 2017-06-02
- 2.0.22 — 2016-12-19
- 2.0.21 — 2016-09-19
- 2.0.20 — 2016-08-25
- 2.0.19 — 2016-08-11
- 2.0.18 — 2016-07-14
- 2.0.17-alpha — 2016-07-08
- 2.0.16-alpha — 2016-07-04
- … 7 more at https://npm.io/package/@types/koa-static/versions

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-static/index.d.ts)
````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
 * Last updated: Tue, 07 Nov 2023 09:09:38 GMT
 * Dependencies: [@types/koa](https://npmjs.com/package/@types/koa), [@types/koa-send](https://npmjs.com/package/@types/koa-send)

# Credits
These definitions were written by [Jerry Chin](https://github.com/hellopao), and [Tomek Łaziuk](https://github.com/tlaziuk).

---
_Source: https://npm.io/package/@types/koa-static · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
