Skip to content

Commit

Permalink
chore: update jsdoc (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
maou-shonen authored Nov 5, 2024
1 parent 08ac7b3 commit 670f783
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import defu from "defu";
import { pino } from "pino";

/**
* hono-pino logger
* hono-pino logger instance
*/
export interface PinoLogger {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { httpCfgSym, PinoLogger } from "./logger";
import type { LiteralString } from "./utils";

/**
* Pino logger middleware
* hono-pino middleware
*/
export const pinoLogger = <ContextKey extends string = "logger">(
opts?: Options<LiteralString<ContextKey>>,
Expand Down
9 changes: 6 additions & 3 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import type { Context } from "hono";
import { pino } from "pino";
import type { PinoLogger } from "./logger";

/**
* pinoLogger options
*/
export interface Options<ContextKey extends string = "logger"> {
/**
* custom context key
Expand Down Expand Up @@ -57,13 +60,13 @@ export interface Options<ContextKey extends string = "logger"> {
*
* @description set to false to disable
*/
http?: false | HttpOptions;
http?: false | HttpLoggerOptions;
}

/**
* http request log options
*/
export type HttpOptions = {
export type HttpLoggerOptions = {
/**
* custom request id
* @deprecated Changed to use referRequestIdKey. will be removed in 1.0.0
Expand Down Expand Up @@ -239,7 +242,7 @@ export type HttpOptions = {
};

/**
* hono-pino default env for hono
* hono-pino default env for hono context
*
* @example
*
Expand Down

0 comments on commit 670f783

Please sign in to comment.