Microsoft/TypeScript

tsc build declarationMap generates incorrect mappings from JSDoc

Open

#48.087 aberto em 2 de mar. de 2022

Ver no GitHub
 (2 comments) (1 reaction) (0 assignees)TypeScript (6.726 forks)batch import
BugDomain: Declaration EmitHelp Wanted

Métricas do repositório

Stars
 (48.455 stars)
Métricas de merge de PR
 (Mesclagem média 6d 17h) (9 fundiu PRs em 30d)

Description

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.

Guia do colaborador