changes the type of next to be a Promise<any> in koa-convert (#28826)

Please fill in this template.

- [x] Use a meaningful title for the pull request. Include the name of the package modified.
- [x] Test the change in your own code. (Compile and run.)
- [x] Add or edit tests to reflect the change. (Run with `npm test`.)
- [x] Follow the advice from the [readme](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#make-a-pull-request).
- [x] Avoid [common mistakes](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#common-mistakes).
- [x] Run `npm run lint package-name` (or `tsc` if no `tslint.json` is present).

If changing an existing definition:
- [ ] Provide a URL to documentation or source code which provides context for the suggested changes: <<url here>>
- [ ] Increase the version number in the header if appropriate.
- [ ] If you are making substantial changes, consider adding a `tslint.json` containing `{ "extends": "dtslint/dt.json" }`.

The 'Koa.Middleware' format is `(ctx: Context, next: () => Promise<any>)` so I've updated the accepted type here to match up.
This commit is contained in:
Daniel Byrne
2018-09-13 12:31:58 -07:00
committed by Ryan Cavanaugh
parent 142b2f5a1b
commit cb47b76131
+1 -1
View File
@@ -7,7 +7,7 @@
import { Context, Middleware } from "koa";
declare function convert(
mw: (context: Context, next: () => void) => Generator
mw: (context: Context, next: () => Promise<any>) => Generator
): Middleware;
export = convert;