Microsoft/TypeScript

JSDoc comments for async_hooks are confusing/misleading

開放

#62,967 建立於 2026年1月9日

 (2 則留言) (0 個反應) (0 位負責人)TypeScript (13,395 個分叉)batch import
Experience EnhancementHelp WantedSuggestion

倉庫指標

星標
 (108,860 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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.

貢獻者指南