question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JS/TS Better inlay hint positioning in multiline rest parameters

See original GitHub issue

The inlay hint positioning in multiline rest parameters is odd.

Considering this function

const setTags = (...tags) => { /* ... */ }

How the hint is positioned: image

What I expected it to be: image

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
MartinJohnscommented, Mar 23, 2022

Looks really fine to me!!

I find that really tough to read, especially if the first argument is slightly longer. I think ideally the inlay hint would produce a fake newline, but I don’t know if that is even possible.

1reaction
NemoSteincommented, Mar 23, 2022

rest parameter hints would get anchored to the token prior to the first rest argument

To reflect that:

const setTags = (thing, ...tags) => { /* ... */ }

Currently it is like this: image

And would become like this: image

Looks really fine to me!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multi-line parameters(arguments) with multiline paraemetrs
I can't find answer to this. What is considered better style: Solution 1(Close parentheses on new line): def initialize(arg1, arg2, ...
Read more >
Warm gas in protostellar outflows - II. Extremely high-velocity ...
The best studied case is Cep-E, in which a multi-line CO study at high spectral ... Based on the LVG results and the...
Read more >
Untitled
28 newman street honea path sc, Douchebag workout cheats games, Kolam pancing kuala ... Matt horpel, Forever more puff johnson, Jets vs bills...
Read more >
Untitled - Snap!
Recursively sort the rest of the list, then insert the one left-over item where it belongs in the list, like adding a card...
Read more >
Untitled
Multi-sensory environment room, Purple eyeshadow quad, Cavil at rest house on stilts ... Paj huam hmoob lyrics, Bacara resort pictures, The best net...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found