microsoft / microsoft/TypeScript

JSDoc comments for async_hooks are confusing/misleading

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

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

Experience Enhancement Help Wanted Suggestion
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

Acknowledgement
  • I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.
Comment

The JSDoc comments from the async_hooks module state not to use the module, and then go on to immediately suggest an "alternative" that is in the module itself.

We strongly discourage the use of the async_hooks API

  • AsyncLocalStorage

If you look at the node.js docs, it makes sense because these two things are on separate pages, but in TS, this warning is shown on import { AsyncLocalStorage } from 'node:async_hooks';

This might be a larger codegen/docs issue as well for other modules that have multiple doc pages.

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

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

はじめの一歩

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

調査の方向性

まず、node:async_hooks モジュールの JSDoc がどのように生成されるかを確認し、その出力を個別の Node.js ドキュメントページと比較します。警告がモジュールに付いているのか、それとも AsyncLocalStorage を含む個々の export に付いているのかを確認します。生成された TypeScript 向けドキュメントで、モジュールの警告がその export に適用されるかのように誤解を招く形で表示されなくなれば完了です。

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

評価

技術スタック
node.js, typescript
領域
documentation
issue の種類
ドキュメント
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

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

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