Microsoft/TypeScript

tsc build declarationMap generates incorrect mappings from JSDoc

Open

#48,087 创建于 2022年3月2日

在 GitHub 查看
 (2 评论) (1 反应) (0 负责人)TypeScript (6,726 fork)batch import
BugDomain: Declaration EmitHelp Wanted

仓库指标

Star
 (48,455 star)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 9 个 PR)

描述

Bug Report

🔎 Search Terms

declarationMap (declaration map) incorrect mappings JSDoc

🕗 Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries
$ npx typescript@next --version
Version 4.7.0-dev.20220302

⏯ Playground Link

SourceMap visualizer with relevant code

💻 Code

Source code sample used in visualizer

🙁 Actual behavior

Go To Definition in VS Code is off by some line / columns. Source mapping visualizer seem to show that generated map is not accurate.

🙂 Expected behavior

Correct source mapping for all type definitions, including function parameters and their types.

贡献者指南