microsoft / microsoft/TypeScript
Signature help not select correct overload for partially completed function
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
From https://github.com/microsoft/vscode/issues/80570
TypeScript Version: 3.7.0-dev.20190907
Search Terms:
- SignatureHelp
- parameter hints
Code
For the code
declare function addEventHandler(event: "onPlayerJoin", x: number): void;
declare function addEventHandler(event: "onPlayerQuit", y: string): void;
addEventHandler('onPlayerQuit')
- Trigger signature help after the closing
'in the call toaddEventHandler
Expected behavior:
Signature help for the second overload is returned
Actual behavior:
Signature help for both overloads is returned. We end up showing the one for onPlayerJoin first

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using the declare function overloads and trigger signature help after the closing quote in addEventHandler('onPlayerQuit'). No file or test is named in the issue; done means signature help selects the second overload rather than presenting both with the incorrect overload first.
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
- Clearly specified
- Newbie friendliness
- 42/100