# @types/koa-convert

> TypeScript definitions for koa-convert

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

## Install

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

## 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 | 1.2.7 |
| Published | 2023-11-07 |
| First published | 2018-08-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51441 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 1.2.7 (latest) — 2023-11-07
- 1.2.4 (ts3.8) — 2022-01-06
- 1.2.3 (ts2.8) — 2019-11-07
- 1.2.2 (ts2.3) — 2019-02-13
- 1.2.6 — 2023-10-18
- 1.2.5 — 2023-09-14
- 1.2.1 — 2018-09-13
- 1.2.0 — 2018-08-29

## README

# Installation
> `npm install --save @types/koa-convert`

# Summary
This package contains type definitions for koa-convert (https://github.com/koajs/convert).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-convert.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-convert/index.d.ts)
````ts
import { DefaultContext, DefaultState, Middleware, Next } from "koa";

type MW<State, Context> = ((next: any) => Generator) | (Middleware<State, Context>);

declare namespace KoaConvert {
    interface convert {
        <State = DefaultState, Context = DefaultContext>(
            mw: MW<State, Context>,
        ): Middleware<State, Context>;

        compose<State = DefaultState, Context = DefaultContext>(
            ...mw: Array<MW<State, Context>>
        ): Middleware<State, Context>;

        back<State = DefaultState, Context = DefaultContext>(
            mw: MW<State, Context>,
        ): Middleware<State, Context>;
    }
}

declare const convert: KoaConvert.convert;

export = convert;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:38 GMT
 * Dependencies: [@types/koa](https://npmjs.com/package/@types/koa)

# Credits
These definitions were written by [Daniel Byrne](https://github.com/danwbyrne).

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