Microsoft/TypeScript
Inlay hints look awkward for callback parameters with a single parameter
Offen
#45.389 geöffnet am 10.08.2021
Domain: LS: Inlay HintsExperience EnhancementHelp WantedRescheduledSuggestion
Repository-Metriken
- Stars
- (108.860 Sterne)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
When you have a callback whose parameter has no parentheses, inlay hints starts to look a little bit weird.
For example, in this code
return hints.map(hint => ({
...hint,
position: scriptInfo.positionToLineOffset(hint.position),
}));
you get the following:

Ideally, you'd see that line rewritten as
callbackfn: (hint: InlayHint) => ({
```