microsoft / microsoft/TypeScript

Documentation returned from constant type instead of from the constant itself

Open
#36,486 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

From https://github.com/microsoft/vscode/issues/89508

TypeScript Version: 3.8.0-dev.20200128

Search Terms:

  • jsdoc
  • quickinfo
  • signatureHelp

Code
For the code:

/**
 * Interface!
 */
interface Handler<T> {
    /**
     * Call!
     */
    (): void;
}

/**
 * Instance!
 */
declare const catHandler: Handler<string>;


catHandler()
  1. Hover over catHandler()

Expected behavior:
Documentation Instance! is returned

Actual behavior:
Documentation for Call! returned:

Screen Shot 2020-01-28 at 2 47 01 PM

/cc @Tyriar

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.

Research direction

The payload names no repository files or tests. Reproduce the hover behavior with the provided TypeScript example, then trace the quickinfo/signatureHelp path that selects documentation for a callable constant; done means hovering catHandler() shows Instance! rather than Call!.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.