Luau type information on hover is useless

As a Roblox developer, it is currently too hard to read Luau type information.

Here, I’m using a function, Computed(), which returns a complex object type. This tooltip is completely useless and unparseable to me, even if it’s technically correct.

image

For comparison, here is the actual defined type of that function;

Notice that it’s returning a well defined Computed<T> type. That’s what I expect to see.

I understand there may be complexity here around duck typing, but at a minimum, when the return type of a function has a typedef, the typedef should be preserved in these tooltips so I can actually understand what my code is using.

Third party language servers for Luau already get this right. Here’s what one looks like in Visual Studio Code:

image

Admittedly still not ideal (it’d be nice to see the generic type rather than just T) but miles better than what Roblox offers.

If Roblox is able to address this issue, it would improve my development experience because I would finally be able to rely on these tooltips for conveying human-readable type information.

16 Likes

I can agree. It looks like what it’s doing is showing how the type looks backend instead of frontend, which is not ideal in any world.

3 Likes