Installation
npm install --save @types/koa-pino-logger
Summary
This package contains type definitions for koa-pino-logger (https://github.com/pinojs/koa-pino-logger).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-pino-logger.
import { Middleware as BaseMiddleware } from "koa";
import { DestinationStream, Logger } from "pino";
import { Options } from "pino-http";
export = logger;
interface Middleware extends BaseMiddleware {
logger: Logger;
}
declare function logger(
opts?: Options,
stream?: DestinationStream,
): Middleware;
declare function logger(stream?: DestinationStream): Middleware;
declare module "koa" {
interface ExtendableContext {
log: Logger;
}
}
Additional Details
Credits
These definitions were written by Cameron Yan, and Jeremy Hull.