microsoft / microsoft/TypeScript

Improve signature help when completing object argument

Open
#29,041 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Domain: LS: Signature Help Needs Proposal 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/56270

TypeScript Version: 3.3.0-dev.20181214

Search Terms:

Code
For a simple TS File:

function foo(x: number, i: { ab: number, cd: number }) { }

foo(1, {

Trigger signature help on last line.

Problem:
We currently just display the entire type in signature help:

screen shot 2018-12-14 at 5 40 27 pm

Some possible quality of life improvements:

  • Underline which parameter you are currently typing and show its documentation
  • Show which parameters have already been completed vs which ones are missing

This is likely not supported by the current VS Code api. Opening this issue for further discussion on how this could be improved

/cc @DanielRosenwasser

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

Reproduce the example by triggering signature help after foo(1, { and review the reported VS Code API limitation. A complete result would define and implement an agreed behavior for highlighting the active object property, showing its documentation, and indicating completed versus missing parameters.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.