IssueRaiser

Tooltips / IntelliSense: Don't resolve type aliases (aka "semantic sugar") set explicitly

We have defined a bunch of "semantic sugar" type aliases like: ![image](https://user-images.githubusercontent.com/4144388/59620493-4b09cc80-912d-11e9-858d-4e79a77622c0.png) **Status quo (bad):** VS Code is resolving these along the alias chain in tooltips and IntelliSense suggestions (which kinda makes non-sense of the type alias in the first place) ![image](https://user-images.githubusercontent.com/4144388/59620716-d7b48a80-912d-11e9-8a4d-0a3de8ff8cb8.png)(c.f. hovered tooltip over `this.url` at bottom) **Better:** Let VS Code show `UrlString` as type here instead of `string` to aid developers with semantic sugar as of what type of string to expect. **Alternative:** Show both, i.e. `BufferingWebSocket.url: UrlString (= string)`.

Posted by Sgt-Nukem on Jun 17, 2019, 4:37 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

github (Other)

Tooltips / IntelliSense: Don't resolve type aliases (aka "semantic sugar") set explicitly

Sgt-NukemJun 17, 2019, 4:37 PM

We have defined a bunch of "semantic sugar" type aliases like: ![image](https://user-images.githubusercontent.com/4144388/59620493-4b09cc80-912d-11e9-858d-4e79a77622c0.png) **Status quo (bad):** VS Code is resolving these along the alias chain in tooltips and IntelliSense suggestions (which kinda makes non-sense of the type alias in the first place) ![image](https://user-images.githubusercontent.com/4144388/59620716-d7b48a80-912d-11e9-8a4d-0a3de8ff8cb8.png)(c.f. hovered tooltip over `this.url` at bottom) **Better:** Let VS Code show `UrlString` as type here instead of `string` to aid developers with semantic sugar as of what type of string to expect. **Alternative:** Show both, i.e. `BufferingWebSocket.url: UrlString (= string)`.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue