microsoft / microsoft/TypeScript

Many errors on JSDoc use entire tag as errorNode

Open
#41,974 7 comments 0 reactions 1 assignee View on GitHub

@iisaduan is already working on this.

Since May 26, 2021.

Bug Domain: JSDoc
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

This is made more obvious by #41877, which corrects the spans of tags to their full spans, making the error spans even more ungainly. Here's one example; see the errors.txt diffs in the linked PR for more.

Expected behavior:

    /** @type {Gioconda} */
        ~~~~~~~~~~~~~~~~ // before #41877
        ~~~~~~~~~~~~~~~~~ // after #41877 (both are wrong)
!!! error TS8030: The type of a function declaration must match the function's signature.
    function monaLisa(sb) {
        return typeof sb === 'string' ? 1 : 2;
    }

Actual behavior:

    /** @type {Gioconda} */
               ~~~~~~~~
!!! error TS8030: The type of a function declaration must match the function's signature.
    function monaLisa(sb) {
        return typeof sb === 'string' ? 1 : 2;
    }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.