Add TypeScript twoslash query-like functionality to Helix #6437
Unanswered
invakid404
asked this question in
Ideas
Replies: 1 comment
-
It sounds like this is already covered by two LSP features. You can use |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There's this one VSCode extension that I really like using that's called vscode-twoslash-queries that lets you use comments of the form
// ^?
to show you inline type information. In the case of the twoslash query extension, it's a TypeScript-specific thing. It's also a feature of the official TypeScript playground.I'm thinking it would be useful if Helix supported this in the general case. My particular use case would be debugging complicated types and observing how they change in real-time. Being able to look at the inferred type for multiple type expressions at the same time and being able to see how my changes affect them without having to manually check them one by one saves me a lot of time and is what I use the twoslash queries extension in VSCode for.
This sounds like it could be generalized into a language-agnostic feature, although I wouldn't know if there's a valid use case outside of TypeScript, except I guess for "illustrative" purposes.
This is how it looks in VSCode (and the TypeScript playground):

Beta Was this translation helpful? Give feedback.
All reactions