microsoft / microsoft/TypeScript

JSDoc tooltip for function type

Open
#44,469 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Experience Enhancement Suggestion
Dominant language
Go
Stars
111k
Forks
14.4k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

Suggestion

🔍 Search Terms

JSDoc tooltip for function type

✅ Viability Checklist

My suggestion meets these guidelines: Yes.

⭐ Suggestion

Show JSDoc tooltip for function type.

📃 Motivating Example

interface F {
  /**
   * Documentation.
   */
  (): void;
}

const f: F;

// In Visual Studio Code I see JSDoc tooltip on mouse hover when I use interface.
f();

/**
 * Documentation.
 */
type G = () => void;

const g: G;

// No JSDoc tooltip for function type.
g();

💻 Use Cases

This should improve working experience when using editors like Visual Studio Code.

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

Start by tracing the TypeScript language-service hover information used for the interface call signature and the function type alias shown in the motivating example. Reproduce both cases in Visual Studio Code and compare the returned tooltips; done when the function type receives its JSDoc tooltip as requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.