1 | // Type definitions for koa-logger 3.1
|
2 | // Project: https://github.com/koajs/logger
|
3 | // Definitions by: Joshua DeVinney <https://github.com/geoffreak>
|
4 | // Tomek Łaziuk <https://github.com/tlaziuk>
|
5 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
6 | // TypeScript Version: 2.3
|
7 |
|
8 | import { Middleware } from "koa";
|
9 |
|
10 | type Transporter = (
|
11 | str: string,
|
12 | args: [string, string, string, number | undefined, string | undefined, string | undefined],
|
13 | ) => void;
|
14 |
|
15 | interface TransporterOpts {
|
16 | transporter: Transporter;
|
17 | }
|
18 |
|
19 | declare function KoaLogger(opts?: Transporter | TransporterOpts): Middleware;
|
20 | declare namespace KoaLogger {}
|
21 | export = KoaLogger;
|