Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

types.ts: LoopCliConfig.logger docstring says 'VerboseLogger instance' but LoggerSpec accepts any Logger

オープン 初心者向け
#78 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
92/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
typescript
領域
documentation

調査の方向性

src/types.ts の LoopCliConfig.logger の docstring から始め、src/loggers.ts の LoggerSpec 定義および issue で言及されている README または createLogger の動作と、その文言を比較します。任意の Logger 実装、'verbose' オプション、undefined を説明するようにドキュメントを更新します。完了条件は、コメントが VerboseLogger のみ受け入れられることをもはや示唆しないことです。

索引モデルが issue の本文から書いたものです。

説明

bug S4

Observed behavior

The docstring on LoopCliConfig.logger in src/types.ts reads:

/**
 * Controls verbose diagnostic logging to stderr. Accepts a concrete
 * `VerboseLogger` instance, the string `'verbose'` (which creates an
 * enabled logger), or `undefined` (quiet, the default).
 */
readonly logger?: LoggerSpec;

This says the field accepts a VerboseLogger instance. But LoggerSpec in src/loggers.ts is defined as:

export type LoggerSpec = Logger | 'verbose' | undefined;

Any object implementing the Logger interface is accepted, not just VerboseLogger. The README and createLogger implementation both treat the field as Logger | 'verbose' | undefined, so callers writing custom loggers will hit no runtime problem; they just see misleading documentation that suggests they have to use VerboseLogger.

Expected behavior

The docstring should describe the field as accepting any Logger implementation (with VerboseLogger mentioned as the built-in option), the string 'verbose', or undefined.

Minimal reproduction

Open src/types.ts and inspect the comment block on the logger field of LoopCliConfig (around line 103), then compare with the LoggerSpec definition in src/loggers.ts.

Suggested fix

Update the docstring to refer to Logger (the public interface) rather than VerboseLogger. For example:

Controls verbose diagnostic logging to stderr. Accepts a concrete
`Logger` instance, the string `'verbose'` (which creates an enabled
`VerboseLogger`), or `undefined` (quiet, the default).
主要言語
TypeScript
スター
2
フォーク
1
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

joewalker/loop-the-loop のほかの issue

joewalker/loop-the-loop の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。