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

Some functions are erroneously listed as returning `undefined`

オープン
#953 コメント 11 件 リアクション 2 件 担当者 0 名 GitHub で見る

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
javascript

調査の方向性

まず、リンクされた net、buffer、fs、http、sqlite、url のドキュメントページに示されている戻り値の型を、それぞれのソースの説明と比較します。特にコンストラクター、オーバーロード、非同期の破棄メソッド、標準外の説明について、doc-kit が戻り値の情報をどのように正規化するかを追跡します。列挙された例で正確な型が示されるか、ソースが曖昧な場合に型が省略されれば完了です。

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

説明

downstream help wanted Web Generator
URL:

https://beta.docs.nodejs.org/net.html#blocklistisblocklistvalue

Browser Name:

Firefox, Chrome

Browser Version:

153.0

Operating System:

macOS 15.7.8

How to reproduce the issue:

The new return type annotations are incorrect if a function has a non-standard description of its return value. An illustrative example is BlockList.isBlockList, which incorrectly shows undefined:

Method with inconsistent return values

A non-exhaustive list of other examples I've found:

Brian edit: converted these to list items for tracking

Presumably these are issues with the source data, which should be made consistent. But previously the documentation "got away" with it because it didn't try to show this normalised value. In the new documentation, it is probably better to err towards not showing the type in cases where it is not clear, to avoid confusion from mismatches.

Common themes are:

  • constructors shown as returning void
  • async dispose methods shown as returning void instead of Promise, as required by the interface
  • functions with non-standard return text shown as returning undefined
  • occasionally functions with multiple possible return types only showing the first option
  • some functions which have annotated their return type in the comments instead of in a structured way
  • overloaded functions only setting a return type on the last overload
主要言語
JavaScript
スター
65
フォーク
71
平均マージ
4日 3時間
マージ済み PR(30日)
31

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

nodejs/doc-kit のほかの issue

nodejs/doc-kit の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

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

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